From 7c03c14e23f021a3883b08329b0bfdea282a2374 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 5 Nov 1999 18:20:30 +0000 Subject: [PATCH] ConstOperator.isOne(type) added and used. git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1211 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/flow/CreatePrePostIncExpression.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jode/jode/flow/CreatePrePostIncExpression.java b/jode/jode/flow/CreatePrePostIncExpression.java index c42d029..664ef87 100644 --- a/jode/jode/flow/CreatePrePostIncExpression.java +++ b/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; } } -