Commit 91a513e8 authored by Max Kellermann's avatar Max Kellermann

db/upnp/Directory: eliminate one std::string copy with std::move()

parent efdb41f2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment