db/upnp/Directory: TitleToPathSegment() returns rvalue reference
Eliminate one implicit std::string copy.
This commit is contained in:
parent
231fffe594
commit
0120f396ac
|
@ -89,11 +89,11 @@ ParseDuration(const char *duration)
|
|||
* this. Twonky returns directory names (titles) like 'Artist/Album'.
|
||||
*/
|
||||
gcc_pure
|
||||
static std::string
|
||||
static std::string &&
|
||||
TitleToPathSegment(std::string &&s)
|
||||
{
|
||||
std::replace(s.begin(), s.end(), '/', '_');
|
||||
return s;
|
||||
return std::move(s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue