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