Return early to avoid unneeded computations
This commit is contained in:
parent
1cf7bdaed8
commit
f6da17eda5
|
@ -267,6 +267,10 @@ static void conditionAlwaysTrueOrFalse(const Token *tok, const std::map<int, Var
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (variableValue.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const Token *vartok, *numtok;
|
const Token *vartok, *numtok;
|
||||||
if (tok->astOperand2() && tok->astOperand2()->isNumber()) {
|
if (tok->astOperand2() && tok->astOperand2()->isNumber()) {
|
||||||
vartok = tok->astOperand1();
|
vartok = tok->astOperand1();
|
||||||
|
|
Loading…
Reference in New Issue