Refactorization: Removed redundant nullptr checks. The existence of the tokens is guaranteed by previous Token::Match() call
This commit is contained in:
parent
5074c11b53
commit
c7987ad11a
|
@ -258,9 +258,7 @@ void CheckOther::warningOldStylePointerCast()
|
|||
// skip first "const" in "const Type* const"
|
||||
if (tok->strAt(1) == "const")
|
||||
tok = tok->next();
|
||||
const Token* typeTok = tok ? tok->next() : nullptr;
|
||||
if (!typeTok)
|
||||
continue;
|
||||
const Token* typeTok = tok->next();
|
||||
// skip second "const" in "const Type* const"
|
||||
if (tok->strAt(3) == "const")
|
||||
tok = tok->next();
|
||||
|
|
Loading…
Reference in New Issue