summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiLSPACE <NiLSPACE@users.noreply.github.com>2015-03-13 08:55:48 +0100
committerNiLSPACE <NiLSPACE@users.noreply.github.com>2015-03-13 08:55:48 +0100
commit57d2a09c8cba990b639736b30e96aad89969bcd9 (patch)
tree39aa3754379cc0929e94af9560d04b355a7ba87f
parentMerge pull request #1761 from mc-server/NetworkIPEnum (diff)
parentPerformance improvements for #1807 (diff)
downloadcuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.tar
cuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.tar.gz
cuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.tar.bz2
cuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.tar.lz
cuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.tar.xz
cuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.tar.zst
cuberite-57d2a09c8cba990b639736b30e96aad89969bcd9.zip
Diffstat (limited to '')
-rw-r--r--src/StringUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp
index 95b3c7400..4adc6a0a0 100644
--- a/src/StringUtils.cpp
+++ b/src/StringUtils.cpp
@@ -151,10 +151,10 @@ AStringVector StringSplitWithQuotes(const AString & str, const AString & delim)
while ((cutAt = str.find_first_of(delim, Prev)) != str.npos)
{
AString current = str.substr(Prev, cutAt - Prev);
- if ((current.at(0) == '"') || (current.at(0) == '\''))
+ if ((current.front() == '"') || (current.front() == '\''))
{
Prev += 1;
- cutAtQuote = str.find_first_of(current.at(0), Prev);
+ cutAtQuote = str.find_first_of(current.front(), Prev);
if (cutAtQuote != str.npos)
{
current = str.substr(Prev, cutAtQuote - Prev);
@@ -162,7 +162,7 @@ AStringVector StringSplitWithQuotes(const AString & str, const AString & delim)
}
}
- results.push_back(current);
+ results.push_back(std::move(current));
Prev = cutAt + 1;
}