Refactoring, use early continue in loop
This commit is contained in:
parent
411c5e5f7e
commit
5e618418d5
|
@ -1579,7 +1579,9 @@ void CheckOther::checkIncompleteStatement()
|
|||
tok = tok->link();
|
||||
|
||||
|
||||
else if (Token::Match(tok, "[;{}] %str%|%num%")) {
|
||||
if (!Token::Match(tok, "[;{}] %str%|%num%"))
|
||||
continue;
|
||||
|
||||
// No warning if numeric constant is followed by a "." or ","
|
||||
if (Token::Match(tok->next(), "%num% [,.]"))
|
||||
continue;
|
||||
|
@ -1614,7 +1616,6 @@ void CheckOther::checkIncompleteStatement()
|
|||
|
||||
constStatementError(tok->next(), tok->next()->isNumber() ? "numeric" : "string");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CheckOther::constStatementError(const Token *tok, const std::string &type)
|
||||
|
|
Loading…
Reference in New Issue