Merge pull request #508 from Dmitry-Me/breakLoopEarly2
Break loop early
This commit is contained in:
commit
73d14d0a9a
|
@ -1742,9 +1742,10 @@ void CheckOther::checkIncompleteStatement()
|
||||||
// bailout if there is a "? :" in this statement
|
// bailout if there is a "? :" in this statement
|
||||||
bool bailout = false;
|
bool bailout = false;
|
||||||
for (const Token *tok2 = tok->tokAt(2); tok2; tok2 = tok2->next()) {
|
for (const Token *tok2 = tok->tokAt(2); tok2; tok2 = tok2->next()) {
|
||||||
if (tok2->str() == "?")
|
if (tok2->str() == "?") {
|
||||||
bailout = true;
|
bailout = true;
|
||||||
else if (tok2->str() == ";")
|
break;
|
||||||
|
} else if (tok2->str() == ";")
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (bailout)
|
if (bailout)
|
||||||
|
|
Loading…
Reference in New Issue