From 91a513e87d832a535e21595eb30463166bcd276e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2014 12:27:21 +0100 Subject: db/upnp/Directory: eliminate one std::string copy with std::move() --- src/db/upnp/Directory.cxx | 4 ++-- 1 file 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; -- cgit v1.2.3