Return early to avoid unneeded computations

This commit is contained in:
Dmitry-Me 2020-02-17 18:56:27 +03:00
parent 1cf7bdaed8
commit f6da17eda5
1 changed files with 4 additions and 0 deletions

View File

@ -267,6 +267,10 @@ static void conditionAlwaysTrueOrFalse(const Token *tok, const std::map<int, Var
return;
}
if (variableValue.empty()) {
return;
}
const Token *vartok, *numtok;
if (tok->astOperand2() && tok->astOperand2()->isNumber()) {
vartok = tok->astOperand1();