diff options
author | flx5 <git@flx5.com> | 2015-03-12 20:16:12 +0100 |
---|---|---|
committer | flx5 <git@flx5.com> | 2015-03-12 20:16:12 +0100 |
commit | 936d56a711623fd5fd607b9f49e8022e4a8129ae (patch) | |
tree | 3aa3005cd61344d8e00da610ad27dc4338280790 /src/StringUtils.cpp | |
parent | Fixed coding conventions for Pull Request #1807 (diff) | |
download | cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.tar cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.tar.gz cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.tar.bz2 cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.tar.lz cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.tar.xz cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.tar.zst cuberite-936d56a711623fd5fd607b9f49e8022e4a8129ae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/StringUtils.cpp | 6 |
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; } |