Commit 0c4a7911 authored by Max Kellermann's avatar Max Kellermann

db/upnp: emplace/move in csvToStrings()

parent 1feedd4d
...@@ -145,7 +145,7 @@ csvToStrings(const char *s, T &tokens) ...@@ -145,7 +145,7 @@ csvToStrings(const char *s, T &tokens)
while (true) { while (true) {
char ch = *s++; char ch = *s++;
if (ch == 0) { if (ch == 0) {
tokens.push_back(current); tokens.emplace_back(std::move(current));
return true; return true;
} }
...@@ -154,7 +154,7 @@ csvToStrings(const char *s, T &tokens) ...@@ -154,7 +154,7 @@ csvToStrings(const char *s, T &tokens)
if (ch == 0) if (ch == 0)
return false; return false;
} else if (ch == ',') { } else if (ch == ',') {
tokens.push_back(current); tokens.emplace_back(std::move(current));
current.clear(); current.clear();
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment