Small refactoring

This commit is contained in:
Daniel Marjamäki 2017-03-03 19:09:32 +01:00
parent 59c1c76a97
commit b1ce229006
1 changed files with 1 additions and 3 deletions

View File

@ -1206,9 +1206,7 @@ void CheckOther::checkVariableScope()
continue;
}
// bailout if initialized with function call that has possible side effects
if (tok->str() == "(" && Token::simpleMatch(tok->astOperand2(), "("))
continue;
if (Token::simpleMatch(tok, "=") && Token::simpleMatch(tok->astOperand2(), "("))
if (Token::Match(tok, "[(=]") && Token::simpleMatch(tok->astOperand2(), "("))
continue;
bool reduce = true;
bool used = false; // Don't warn about unused variables