ConstOperator.isOne(type) added and used.

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1211 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent e959a929a9
commit 7c03c14e23
  1. 6
      jode/jode/flow/CreatePrePostIncExpression.java

@ -135,10 +135,7 @@ public class CreatePrePostIncExpression {
else
return false;
/* Why doubleValue? This is the most exact measurement. */
if (((Number)constOp.getValue()).doubleValue() == -1.0)
op ^= 1;
else if (((Number)constOp.getValue()).doubleValue() != 1.0)
if (!constOp.isOne(lvalue.getType()))
return false;
if (!(last.outer instanceof SequentialBlock))
@ -184,4 +181,3 @@ public class CreatePrePostIncExpression {
return true;
}
}

Loading…
Cancel
Save