Fix boolean expressions (#4099)
* Enable experimental check * Remove experimental * Don't compare Booleans using relational operators * Fix boolean expressions
This commit is contained in:
parent
f23111d610
commit
759c16fcef
|
@ -6672,10 +6672,12 @@ bool Tokenizer::simplifyConditions()
|
||||||
result = (op1 == op2);
|
result = (op1 == op2);
|
||||||
else if (cmp == "!=")
|
else if (cmp == "!=")
|
||||||
result = (op1 != op2);
|
result = (op1 != op2);
|
||||||
else if (cmp == ">=" || cmp == "<=")
|
else if (cmp == ">=")
|
||||||
result = true;
|
result = (op1 || !op2);
|
||||||
else if (cmp == ">")
|
else if (cmp == ">")
|
||||||
result = (op1 && !op2);
|
result = (op1 && !op2);
|
||||||
|
else if (cmp == "<=")
|
||||||
|
result = (!op1 || op2);
|
||||||
else if (cmp == "<")
|
else if (cmp == "<")
|
||||||
result = (!op1 && op2);
|
result = (!op1 && op2);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue