db/upnp/Directory: eliminate one std::string copy with std::move()
This commit is contained in:
parent
efdb41f2a6
commit
91a513e87d
|
@ -65,7 +65,7 @@ ParseDuration(const std::string &duration)
|
||||||
*/
|
*/
|
||||||
gcc_pure
|
gcc_pure
|
||||||
static std::string
|
static std::string
|
||||||
titleToPathElt(std::string s)
|
titleToPathElt(std::string &&s)
|
||||||
{
|
{
|
||||||
std::replace(s.begin(), s.end(), '/', '_');
|
std::replace(s.begin(), s.end(), '/', '_');
|
||||||
return s;
|
return s;
|
||||||
|
@ -170,7 +170,7 @@ protected:
|
||||||
case 'd':
|
case 'd':
|
||||||
if (!m_path.back().compare("dc:title")) {
|
if (!m_path.back().compare("dc:title")) {
|
||||||
m_tobj.m_title = str;
|
m_tobj.m_title = str;
|
||||||
m_tobj.name = titleToPathElt(str);
|
m_tobj.name = titleToPathElt(std::move(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue