From 0120f396acadc56ef907e64a2ec40060e4ee5678 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 9 Nov 2014 20:44:41 +0100 Subject: db/upnp/Directory: TitleToPathSegment() returns rvalue reference Eliminate one implicit std::string copy. --- src/db/plugins/upnp/Directory.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/db') 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); } /** -- cgit v1.2.3