From 0c4a791111905df86a604261e331b29a1ee8b1ed Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 22 Jan 2014 23:19:35 +0100 Subject: [PATCH] db/upnp: emplace/move in csvToStrings() --- src/db/upnp/Util.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/upnp/Util.cxx b/src/db/upnp/Util.cxx index b316b362b..cf34a47d3 100644 --- a/src/db/upnp/Util.cxx +++ b/src/db/upnp/Util.cxx @@ -145,7 +145,7 @@ csvToStrings(const char *s, T &tokens) while (true) { char ch = *s++; if (ch == 0) { - tokens.push_back(current); + tokens.emplace_back(std::move(current)); return true; } @@ -154,7 +154,7 @@ csvToStrings(const char *s, T &tokens) if (ch == 0) return false; } else if (ch == ',') { - tokens.push_back(current); + tokens.emplace_back(std::move(current)); current.clear(); continue; }