Pre-check to reduce number of match checks

This commit is contained in:
Dmitry-Me 2015-12-24 13:07:47 +03:00
parent 31171f038a
commit 7303790a73
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ void CheckFunctions::checkMathFunctions()
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) { for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
if (tok->varId()) if (tok->varId())
continue; continue;
if (printWarnings) { if (printWarnings && Token::Match(tok, "%name% ( !!)")) {
if (tok->strAt(-1) != "." if (tok->strAt(-1) != "."
&& Token::Match(tok, "log|logf|logl|log10|log10f|log10l ( %num% )")) { && Token::Match(tok, "log|logf|logl|log10|log10f|log10l ( %num% )")) {
const std::string& number = tok->strAt(2); const std::string& number = tok->strAt(2);