diff options
author | Max Kellermann <max@duempel.org> | 2014-01-14 12:27:21 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-14 12:27:21 +0100 |
commit | 91a513e87d832a535e21595eb30463166bcd276e (patch) | |
tree | 7ee67dbda7c848e9c5946bb2597ba0bd85de44e4 /src | |
parent | efdb41f2a6c194f0ec6371684a8f6b8fcdbe0bcd (diff) | |
download | mpd-91a513e87d832a535e21595eb30463166bcd276e.tar.gz mpd-91a513e87d832a535e21595eb30463166bcd276e.tar.xz mpd-91a513e87d832a535e21595eb30463166bcd276e.zip |
db/upnp/Directory: eliminate one std::string copy with std::move()
Diffstat (limited to 'src')
-rw-r--r-- | src/db/upnp/Directory.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/upnp/Directory.cxx b/src/db/upnp/Directory.cxx index ba759837d..cc28ec295 100644 --- a/src/db/upnp/Directory.cxx +++ b/src/db/upnp/Directory.cxx @@ -65,7 +65,7 @@ ParseDuration(const std::string &duration) */ gcc_pure static std::string -titleToPathElt(std::string s) +titleToPathElt(std::string &&s) { std::replace(s.begin(), s.end(), '/', '_'); return s; @@ -170,7 +170,7 @@ protected: case 'd': if (!m_path.back().compare("dc:title")) { m_tobj.m_title = str; - m_tobj.name = titleToPathElt(str); + m_tobj.name = titleToPathElt(std::move(str)); } break; |