Break loop early
This commit is contained in:
parent
323475393b
commit
1f31dd749b
|
@ -1742,9 +1742,10 @@ void CheckOther::checkIncompleteStatement()
|
|||
// bailout if there is a "? :" in this statement
|
||||
bool bailout = false;
|
||||
for (const Token *tok2 = tok->tokAt(2); tok2; tok2 = tok2->next()) {
|
||||
if (tok2->str() == "?")
|
||||
if (tok2->str() == "?") {
|
||||
bailout = true;
|
||||
else if (tok2->str() == ";")
|
||||
break;
|
||||
} else if (tok2->str() == ";")
|
||||
break;
|
||||
}
|
||||
if (bailout)
|
||||
|
|
Loading…
Reference in New Issue