aboutsummaryrefslogtreecommitdiffstats
path: root/src/TagId3.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-30 20:11:57 +0200
committerMax Kellermann <max@duempel.org>2013-07-30 20:19:53 +0200
commit06f898cc1240a29b293de0e97ad95a4fdc971254 (patch)
tree001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/TagId3.cxx
parent6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff)
downloadmpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip
tag: convert to C++
Diffstat (limited to 'src/TagId3.cxx')
-rw-r--r--src/TagId3.cxx11
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;
}