Skip to content

Commit

Permalink
Performance improvements for #1807
Browse files Browse the repository at this point in the history
  • Loading branch information
flx5 committed Mar 12, 2015
1 parent f6912bd commit 936d56a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/StringUtils.cpp
Original file line number Diff line number Diff line change
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 936d56a

Please sign in to comment.