diff options
author | Max Kellermann <max@duempel.org> | 2013-07-30 20:11:57 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-30 20:19:53 +0200 |
commit | 06f898cc1240a29b293de0e97ad95a4fdc971254 (patch) | |
tree | 001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/TagId3.cxx | |
parent | 6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff) | |
download | mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip |
tag: convert to C++
Diffstat (limited to '')
-rw-r--r-- | src/TagId3.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/TagId3.cxx b/src/TagId3.cxx index 7f033b5c4..6b2174fe5 100644 --- a/src/TagId3.cxx +++ b/src/TagId3.cxx @@ -21,7 +21,7 @@ #include "TagId3.hxx" #include "TagHandler.hxx" #include "TagTable.hxx" -#include "tag.h" +#include "Tag.hxx" extern "C" { #include "riff.h" @@ -385,14 +385,15 @@ scan_id3_tag(struct id3_tag *tag, tag_id3_import_ufid(tag, handler, handler_ctx); } -struct tag *tag_id3_import(struct id3_tag * tag) +Tag * +tag_id3_import(struct id3_tag *tag) { - struct tag *ret = tag_new(); + Tag *ret = new Tag(); scan_id3_tag(tag, &add_tag_handler, ret); - if (tag_is_empty(ret)) { - tag_free(ret); + if (ret->IsEmpty()) { + delete ret; ret = nullptr; } |