diff options
Diffstat (limited to 'src/tag')
-rw-r--r-- | src/tag/Id3Scan.cxx | 6 | ||||
-rw-r--r-- | src/tag/Id3Scan.hxx | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/tag/Id3Scan.cxx b/src/tag/Id3Scan.cxx index 6d1dd970f..c35b4ac7e 100644 --- a/src/tag/Id3Scan.cxx +++ b/src/tag/Id3Scan.cxx @@ -329,15 +329,13 @@ scan_id3_tag(const struct id3_tag *tag, TagHandler &handler) noexcept tag_id3_import_ufid(tag, handler); } -std::unique_ptr<Tag> +Tag tag_id3_import(const struct id3_tag *tag) noexcept { TagBuilder tag_builder; AddTagHandler h(tag_builder); scan_id3_tag(tag, h); - return tag_builder.empty() - ? nullptr - : tag_builder.CommitNew(); + return tag_builder.Commit(); } bool diff --git a/src/tag/Id3Scan.hxx b/src/tag/Id3Scan.hxx index 903f6232f..4f880f6be 100644 --- a/src/tag/Id3Scan.hxx +++ b/src/tag/Id3Scan.hxx @@ -32,7 +32,7 @@ struct id3_tag; bool tag_id3_scan(InputStream &is, TagHandler &handler) noexcept; -std::unique_ptr<Tag> +Tag tag_id3_import(const struct id3_tag *) noexcept; /** |