use early continue
This commit is contained in:
parent
c0e14d0a5d
commit
31dd4ed787
|
@ -292,7 +292,8 @@ void CheckSizeof::sizeofCalculation()
|
|||
const bool printInconclusive = _settings->inconclusive;
|
||||
|
||||
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) {
|
||||
if (Token::simpleMatch(tok, "sizeof (")) {
|
||||
if (!Token::simpleMatch(tok, "sizeof ("))
|
||||
continue;
|
||||
|
||||
// ignore if the `sizeof` result is cast to void inside a macro, i.e. the calculation is
|
||||
// expected to be parsed but skipped, such as in a disabled custom ASSERT() macro
|
||||
|
@ -309,7 +310,6 @@ void CheckSizeof::sizeofCalculation()
|
|||
sizeofCalculationError(argument, argument->isExpandedMacro());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CheckSizeof::sizeofCalculationError(const Token *tok, bool inconclusive)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue