Skip to content

Commit

Permalink
Merge pull request #1809 from flx5/master
Browse files Browse the repository at this point in the history
Performance improvements for #1807
  • Loading branch information
NiLSPACE committed Mar 13, 2015
2 parents f9991c9 + 936d56a commit 57d2a09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/StringUtils.cpp
Expand Up @@ -151,18 +151,18 @@ 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);
cutAt = cutAtQuote + 1;
}
}

results.push_back(current);
results.push_back(std::move(current));
Prev = cutAt + 1;
}

Expand Down

0 comments on commit 57d2a09

Please sign in to comment.