IcyMetaDataParser: return std::unique_ptr<Tag>

This commit is contained in:
Max Kellermann
2017-12-20 15:06:33 +01:00
parent 6b77ee9a5e
commit 99f4bce112
3 changed files with 11 additions and 13 deletions

View File

@@ -55,10 +55,10 @@ IcyInputStream::ReadTag()
input_tag = new_input_tag;
}
Tag *new_icy_tag = parser.ReadTag();
auto new_icy_tag = parser.ReadTag();
if (new_icy_tag != nullptr) {
delete icy_tag;
icy_tag = new_icy_tag;
icy_tag = new_icy_tag.release();
}
if (new_input_tag == nullptr && new_icy_tag == nullptr)