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);
|
||||
else if (cmp == "!=")
|
||||
result = (op1 != op2);
|
||||
else if (cmp == ">=" || cmp == "<=")
|
||||
result = true;
|
||||
else if (cmp == ">=")
|
||||
result = (op1 || !op2);
|
||||
else if (cmp == ">")
|
||||
result = (op1 && !op2);
|
||||
else if (cmp == "<=")
|
||||
result = (!op1 || op2);
|
||||
else if (cmp == "<")
|
||||
result = (!op1 && op2);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue