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"
|
// skip first "const" in "const Type* const"
|
||||||
if (tok->strAt(1) == "const")
|
if (tok->strAt(1) == "const")
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
const Token* typeTok = tok ? tok->next() : nullptr;
|
const Token* typeTok = tok->next();
|
||||||
if (!typeTok)
|
|
||||||
continue;
|
|
||||||
// skip second "const" in "const Type* const"
|
// skip second "const" in "const Type* const"
|
||||||
if (tok->strAt(3) == "const")
|
if (tok->strAt(3) == "const")
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
|
Loading…
Reference in New Issue