Merge pull request #738 from Dmitry-Me/reduceMatchCalls

Pre-check to reduce number of match checks
This commit is contained in:
PKEuS 2015-12-24 13:48:56 +01:00
commit 0052896c41
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()) {
if (tok->varId())
continue;
if (printWarnings) {
if (printWarnings && Token::Match(tok, "%name% ( !!)")) {
if (tok->strAt(-1) != "."
&& Token::Match(tok, "log|logf|logl|log10|log10f|log10l ( %num% )")) {
const std::string& number = tok->strAt(2);