From e153407b51a618e8b498edd7af7410f936e3bfa0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 6 Jun 2019 13:42:14 +0200 Subject: [PATCH] tag/Id3Scan: eliminate a string copy in UFID importer --- src/tag/Id3Scan.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tag/Id3Scan.cxx b/src/tag/Id3Scan.cxx index 823e175b5..ca862c86e 100644 --- a/src/tag/Id3Scan.cxx +++ b/src/tag/Id3Scan.cxx @@ -32,7 +32,6 @@ #include -#include #include #include @@ -282,8 +281,8 @@ tag_id3_import_ufid(const struct id3_tag *id3_tag, if (value == nullptr || length == 0) continue; - std::string p((const char *)value, length); - handler.OnTag(TAG_MUSICBRAINZ_TRACKID, p.c_str()); + handler.OnTag(TAG_MUSICBRAINZ_TRACKID, + {(const char *)value, length}); } }