From 06f898cc1240a29b293de0e97ad95a4fdc971254 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 30 Jul 2013 20:11:57 +0200 Subject: tag: convert to C++ --- src/TagId3.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/TagId3.cxx') 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; } -- cgit v1.2.3