Refactoring: Use %op% instead of Token::isOp in CheckBufferOverrun

This commit is contained in:
Daniel Marjamäki 2011-04-09 18:37:03 +02:00
parent a4471bc150
commit bd93997e4f
1 changed files with 1 additions and 1 deletions

View File

@ -707,7 +707,7 @@ void CheckBufferOverrun::checkFunctionParameter(const Token &tok, unsigned int p
Token::Match(ftok, "%var% --"))
break;
if ((Token::Match(ftok->previous(), "[=;{}]") || ftok->previous()->isOp()) && Token::Match(ftok, "%var% [ %num% ]"))
if (Token::Match(ftok->previous(), "=|;|{|}|%op% %var% [ %num% ]"))
{
const MathLib::bigint index = MathLib::toLongNumber(ftok->strAt(2));
if (index >= 0 && arrayInfo.num[0] > 0 && index >= arrayInfo.num[0])