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:
parent
4245047674
commit
57f1a6d2b7
|
@ -656,7 +656,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list<const Toke
|
||||||
}
|
}
|
||||||
else if (tok->next() &&
|
else if (tok->next() &&
|
||||||
tok->next()->link() &&
|
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)");
|
addtoken("if(!var)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue