Make loop termination more explicit.
This commit is contained in:
parent
5483c8ed5e
commit
120e8c0674
|
@ -2589,9 +2589,11 @@ void Tokenizer::setVarId()
|
|||
const Token *tok3 = tok2->next();
|
||||
if (!tok3->isStandardType() && tok3->str() != "void" && !Token::Match(tok3, "struct|union|class %type%") && tok3->str() != "." && !Token::Match(tok2->link()->previous(), "[&*]")) {
|
||||
bool isDecl = true;
|
||||
for (; tok3 && isDecl; tok3 = tok3->nextArgument()) {
|
||||
if (tok3->strAt(-1) == "&" || tok3->strAt(-1) == "*" || (notstart.find(tok3->str()) == notstart.end() && setVarIdParseDeclaration(&tok3, variableId, executableScope.top(), isCPP())))
|
||||
for (; tok3; tok3 = tok3->nextArgument()) {
|
||||
if (tok3->strAt(-1) == "&" || tok3->strAt(-1) == "*" || (notstart.find(tok3->str()) == notstart.end() && setVarIdParseDeclaration(&tok3, variableId, executableScope.top(), isCPP()))) {
|
||||
isDecl = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isDecl) {
|
||||
variableId[tok2->previous()->str()] = ++_varId;
|
||||
|
|
Loading…
Reference in New Issue