Pre-check to reduce number of match checks
This commit is contained in:
parent
31171f038a
commit
7303790a73
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue