diff options
author | Max Kellermann <max@musicpd.org> | 2017-02-08 09:42:09 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-02-08 09:42:09 +0100 |
commit | 76380b2b45c27baa2ab79d5e18e4d0e9f8deb0af (patch) | |
tree | 482846b738169a084600766e8a45605317f42b3f /src/DetachedSong.cxx | |
parent | 67b7d46432dd66cd94571489d231a4795ce4da39 (diff) |
DetachedSong: pass std::string&& to uri initializer
Eliminate one temporary allocation.
Diffstat (limited to 'src/DetachedSong.cxx')
-rw-r--r-- | src/DetachedSong.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DetachedSong.cxx b/src/DetachedSong.cxx index 8bef0f6ff..4774cfd23 100644 --- a/src/DetachedSong.cxx +++ b/src/DetachedSong.cxx @@ -24,7 +24,7 @@ #include "fs/Traits.hxx" DetachedSong::DetachedSong(const LightSong &other) - :uri(other.GetURI().c_str()), + :uri(other.GetURI()), real_uri(other.real_uri != nullptr ? other.real_uri : ""), tag(*other.tag), mtime(other.mtime), |