Replace tok->previous()->previous()->previous() call to tok->tokAt(-3).

Done by command:
git grep -l 'previous()->previous()->previous()' |
xargs sed -i 's|previous()->previous()->previous()|tokAt(-3)|'

No functional change.
This commit is contained in:
Slava Semushin 2009-06-14 13:24:13 +07:00
parent 4245047674
commit 57f1a6d2b7
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list<const Toke
}
else if (tok->next() &&
tok->next()->link() &&
Token::simpleMatch(tok->next()->link()->previous()->previous()->previous(), std::string("&& ! " + varnameStr).c_str()))
Token::simpleMatch(tok->next()->link()->tokAt(-3), std::string("&& ! " + varnameStr).c_str()))
{
addtoken("if(!var)");
}