Don't use Token::Match() for simple string comparison

This commit is contained in:
Thomas Jarosch 2013-01-22 13:16:23 +01:00
parent ddb604d1a5
commit f97015e244
1 changed files with 1 additions and 1 deletions

View File

@ -404,7 +404,7 @@ bool CheckNullPointer::isPointerDeRef(const Token *tok, bool &unknown, const Sym
return false;
// OK to check pointer in "= p ? : "
if (Token::Match(tok->next(),"?") &&
if (tok->next()->str() == "?" &&
(Token::Match(tok->previous(), "return|throw|;|{|}|:|[|(|,") || tok->previous()->isAssignmentOp()))
return false;