Clang import; Fix in splitString

This commit is contained in:
Daniel Marjamäki 2020-01-10 11:40:28 +01:00
parent 4ed7178d4d
commit d0c1674fe6
1 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,11 @@ static std::vector<std::string> splitString(const std::string &line)
pos2 = line.find("\'", pos2 + 3);
} else {
pos2 = line.find(" ", pos1) - 1;
if (std::isalpha(line[pos1]) && line.find("<", pos1) < pos2 && line.find(">", pos1) > pos2) {
if (std::isalpha(line[pos1]) &&
line.find("<", pos1) < pos2 &&
line.find("<<",pos1) != line.find("<",pos1) &&
line.find(">", pos1) != std::string::npos &&
line.find(">", pos1) > pos2) {
int level = 0;
pos2 = pos1;
for (pos2 = pos1; pos2 < line.size(); ++pos2) {