tag/Builder: CommitNew() returns std::unique_ptr<Tag>

This commit is contained in:
Max Kellermann
2017-12-20 14:49:48 +01:00
parent d293aaf945
commit cb3042ffb2
8 changed files with 16 additions and 14 deletions

View File

@@ -115,7 +115,7 @@ find_end_quote(char *p, char *const end)
}
}
static Tag *
static std::unique_ptr<Tag>
icy_parse_tag(char *p, char *const end)
{
assert(p != nullptr);
@@ -210,7 +210,7 @@ IcyMetaDataParser::Meta(const void *data, size_t length)
delete tag;
tag = icy_parse_tag(meta_data, meta_data + meta_size);
tag = icy_parse_tag(meta_data, meta_data + meta_size).release();
delete[] meta_data;
/* change back to normal data mode */