1
0
Fork 0

correct logic.

This commit is contained in:
James 2014-11-08 13:52:24 +00:00
parent 586cacc2ee
commit bc80940018
1 changed files with 4 additions and 4 deletions

View File

@ -2820,11 +2820,11 @@ struct RemoveRedundantOR {
else {
int cmp = CompareAstNodes(lhs, bestValue);
if ((condition == NODE_TYPE_OPERATOR_BINARY_LT || condition ==
NODE_TYPE_OPERATOR_BINARY_LE) && cmp == -1) {
NODE_TYPE_OPERATOR_BINARY_LE) && cmp == 1) {
bestValue = lhs;
}
else if ((condition == NODE_TYPE_OPERATOR_BINARY_GT || condition ==
NODE_TYPE_OPERATOR_BINARY_GE) && cmp == 1) {
NODE_TYPE_OPERATOR_BINARY_GE) && cmp == -1) {
bestValue = lhs;
}
}
@ -2842,11 +2842,11 @@ struct RemoveRedundantOR {
else {
int cmp = CompareAstNodes(bestValue, rhs);
if ((condition == NODE_TYPE_OPERATOR_BINARY_LT || condition ==
NODE_TYPE_OPERATOR_BINARY_LE) && cmp == 1) {
NODE_TYPE_OPERATOR_BINARY_LE) && cmp == -1) {
bestValue = rhs;
}
else if ((condition == NODE_TYPE_OPERATOR_BINARY_GT || condition ==
NODE_TYPE_OPERATOR_BINARY_GE) && cmp == -1) {
NODE_TYPE_OPERATOR_BINARY_GE) && cmp == 1) {
bestValue = rhs;
}
}