summaryrefslogtreecommitdiff
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-19 19:43:03 +0200
committerMax Kellermann <max@musicpd.org>2018-10-19 19:43:03 +0200
commited5c0d65461b14ae02fe1cc7c1049c1de93fc85b (patch)
tree0549955eb3b3257eb9c531f84ef86b16163c53b1 /src/tag
parent86dc621086bff763e284bd13ac2a28dd32b8df25 (diff)
tag/Id3Scan: make struct id3_tag pointers `const`
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/Id3Scan.cxx12
-rw-r--r--src/tag/Id3Scan.hxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/tag/Id3Scan.cxx b/src/tag/Id3Scan.cxx
index aa1caba69..d7afaf7cf 100644
--- a/src/tag/Id3Scan.cxx
+++ b/src/tag/Id3Scan.cxx
@@ -142,7 +142,7 @@ tag_id3_import_text_frame(const struct id3_frame *frame,
* 4.2). This is a wrapper for tag_id3_import_text_frame().
*/
static void
-tag_id3_import_text(struct id3_tag *tag, const char *id, TagType type,
+tag_id3_import_text(const struct id3_tag *tag, const char *id, TagType type,
TagHandler &handler) noexcept
{
const struct id3_frame *frame;
@@ -191,7 +191,7 @@ tag_id3_import_comment_frame(const struct id3_frame *frame, TagType type,
* wrapper for tag_id3_import_comment_frame().
*/
static void
-tag_id3_import_comment(struct id3_tag *tag, const char *id, TagType type,
+tag_id3_import_comment(const struct id3_tag *tag, const char *id, TagType type,
TagHandler &handler) noexcept
{
const struct id3_frame *frame;
@@ -217,7 +217,7 @@ tag_id3_parse_txxx_name(const char *name) noexcept
* Import all known MusicBrainz tags from TXXX frames.
*/
static void
-tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
+tag_id3_import_musicbrainz(const struct id3_tag *id3_tag,
TagHandler &handler) noexcept
{
for (unsigned i = 0;; ++i) {
@@ -250,7 +250,7 @@ tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
* Imports the MusicBrainz TrackId from the UFID tag.
*/
static void
-tag_id3_import_ufid(struct id3_tag *id3_tag,
+tag_id3_import_ufid(const struct id3_tag *id3_tag,
TagHandler &handler) noexcept
{
for (unsigned i = 0;; ++i) {
@@ -283,7 +283,7 @@ tag_id3_import_ufid(struct id3_tag *id3_tag,
}
void
-scan_id3_tag(struct id3_tag *tag, TagHandler &handler) noexcept
+scan_id3_tag(const struct id3_tag *tag, TagHandler &handler) noexcept
{
tag_id3_import_text(tag, ID3_FRAME_ARTIST, TAG_ARTIST,
handler);
@@ -323,7 +323,7 @@ scan_id3_tag(struct id3_tag *tag, TagHandler &handler) noexcept
}
std::unique_ptr<Tag>
-tag_id3_import(struct id3_tag *tag)
+tag_id3_import(const struct id3_tag *tag) noexcept
{
TagBuilder tag_builder;
AddTagHandler h(tag_builder);
diff --git a/src/tag/Id3Scan.hxx b/src/tag/Id3Scan.hxx
index 8ce23ad46..903f6232f 100644
--- a/src/tag/Id3Scan.hxx
+++ b/src/tag/Id3Scan.hxx
@@ -33,13 +33,13 @@ bool
tag_id3_scan(InputStream &is, TagHandler &handler) noexcept;
std::unique_ptr<Tag>
-tag_id3_import(id3_tag *);
+tag_id3_import(const struct id3_tag *) noexcept;
/**
* Import all tags from the provided id3_tag *tag
*
*/
void
-scan_id3_tag(id3_tag *tag, TagHandler &handler) noexcept;
+scan_id3_tag(const struct id3_tag *tag, TagHandler &handler) noexcept;
#endif