aboutsummaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-09 20:44:41 +0100
committerMax Kellermann <max@duempel.org>2014-11-09 20:46:32 +0100
commit0120f396acadc56ef907e64a2ec40060e4ee5678 (patch)
tree8245eb01262c765f9db473e2fbc34de64aafd2a2 /src/db
parent231fffe594f2ac8964e816758cd4d773a25345be (diff)
downloadmpd-0120f396acadc56ef907e64a2ec40060e4ee5678.tar.gz
mpd-0120f396acadc56ef907e64a2ec40060e4ee5678.tar.xz
mpd-0120f396acadc56ef907e64a2ec40060e4ee5678.zip
db/upnp/Directory: TitleToPathSegment() returns rvalue reference
Eliminate one implicit std::string copy.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/plugins/upnp/Directory.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/plugins/upnp/Directory.cxx b/src/db/plugins/upnp/Directory.cxx
index 08a053d00..55f2693ae 100644
--- a/src/db/plugins/upnp/Directory.cxx
+++ b/src/db/plugins/upnp/Directory.cxx
@@ -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);
}
/**