Don't use Token::Match() for simple string comparison
This commit is contained in:
parent
ddb604d1a5
commit
f97015e244
|
@ -404,7 +404,7 @@ bool CheckNullPointer::isPointerDeRef(const Token *tok, bool &unknown, const Sym
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// OK to check pointer in "= p ? : "
|
// OK to check pointer in "= p ? : "
|
||||||
if (Token::Match(tok->next(),"?") &&
|
if (tok->next()->str() == "?" &&
|
||||||
(Token::Match(tok->previous(), "return|throw|;|{|}|:|[|(|,") || tok->previous()->isAssignmentOp()))
|
(Token::Match(tok->previous(), "return|throw|;|{|}|:|[|(|,") || tok->previous()->isAssignmentOp()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue