aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/db/upnp/Util.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db/upnp/Util.cxx b/src/db/upnp/Util.cxx
index 383e23074..9b223aca9 100644
--- a/src/db/upnp/Util.cxx
+++ b/src/db/upnp/Util.cxx
@@ -107,15 +107,15 @@ stringToTokens(const std::string &str,
// Add token to the vector and adjust start
if (pos == std::string::npos) {
- tokens.push_back(str.substr(startPos));
+ tokens.emplace_back(str, startPos);
break;
} else if (pos == startPos) {
// Dont' push empty tokens after first
if (tokens.empty())
- tokens.push_back(std::string());
+ tokens.emplace_back();
startPos = ++pos;
} else {
- tokens.push_back(str.substr(startPos, pos - startPos));
+ tokens.emplace_back(str, startPos, pos - startPos);
startPos = ++pos;
}
}