status: optimize filtering when chars are being taken from input queue

This commit is contained in:
Andrzej Rybczak
2012-09-05 22:20:50 +02:00
parent 39c5087d18
commit 21947d3655
5 changed files with 35 additions and 11 deletions

View File

@@ -174,6 +174,8 @@ std::string getEnclosedString(const std::string &s, char a, char b, size_t *pos)
// we want to set pos to char after b if possible
if (i < s.length())
++i;
else // we reached end of string and didn't encounter closing char
result.clear();
}
if (pos != 0)
*pos = i;