You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2004/01/05 03:43:11 UTC

cvs commit: xml-fop/src/java/org/apache/fop/fo/expr PropertyParser.java

pbwest      2004/01/04 18:43:11

  Modified:    src/java/org/apache/fop/fo/expr Tag: FOP_0-20-0_Alt-Design
                        PropertyParser.java
  Log:
  Removed redundant casts. Flagged by Eclipse.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +7 -12     xml-fop/src/java/org/apache/fop/fo/expr/PropertyParser.java
  
  Index: PropertyParser.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/PropertyParser.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PropertyParser.java	5 Jul 2003 19:14:07 -0000	1.1.2.1
  +++ PropertyParser.java	5 Jan 2004 02:43:11 -0000	1.1.2.2
  @@ -314,8 +314,7 @@
                           ((Numeric)prop).add((Numeric)pv);
                           break inner;
                       case PropertyValue.INTEGER:
  -                        ((Numeric)prop).add((double)
  -                                            (((IntegerType)pv).getInt()));
  +                        ((Numeric)prop).add(((IntegerType)pv).getInt());
                           break inner;
                       default:
                           throw new PropertyException(arithErrorStr());
  @@ -328,8 +327,7 @@
                           ((Numeric)prop).subtract((Numeric)pv);
                           break inner;
                       case PropertyValue.INTEGER:
  -                        ((Numeric)prop).subtract((double)
  -                                             (((IntegerType)pv).getInt()));
  +                        ((Numeric)prop).subtract(((IntegerType)pv).getInt());
                           break inner;
                       default:
                           throw new PropertyException(arithErrorStr());
  @@ -346,7 +344,7 @@
                       pv = parseMultiplicativeExpr();
                       switch (pv.getType()) {
                       case PropertyValue.NUMERIC:
  -                        prop = ((Numeric)pv).add((double)intVal);
  +                        prop = ((Numeric)pv).add(intVal);
                           break inner;
                       case PropertyValue.INTEGER:
                           ((IntegerType)prop).setInt(intVal +
  @@ -360,7 +358,7 @@
                       pv = parseMultiplicativeExpr();
                       switch (pv.getType()) {
                       case PropertyValue.NUMERIC:
  -                        ((Numeric)pv).add((double)(-intVal));
  +                        ((Numeric)pv).add(-intVal);
                           prop = ((Numeric)pv).negate();
                           break inner;
                       case PropertyValue.INTEGER:
  @@ -405,8 +403,7 @@
                       pv = parseUnaryExpr();
                       switch (pv.getType()) {
                       case PropertyValue.INTEGER:
  -                        ((Numeric)prop).divide
  -                                        ((double)(((IntegerType)pv).getInt()));
  +                        ((Numeric)prop).divide(((IntegerType)pv).getInt());
                           break inner;
                       case PropertyValue.NUMERIC:
                           ((Numeric)prop).divide((Numeric)pv);
  @@ -419,8 +416,7 @@
                       pv = parseUnaryExpr();
                       switch (pv.getType()) {
                       case PropertyValue.INTEGER:
  -                        ((Numeric)prop).mod
  -                                        ((double)(((IntegerType)pv).getInt()));
  +                        ((Numeric)prop).mod(((IntegerType)pv).getInt());
                           break inner;
                       case PropertyValue.NUMERIC:
                           ((Numeric)prop).mod((Numeric)pv);
  @@ -433,8 +429,7 @@
                       pv = parseUnaryExpr();
                       switch (pv.getType()) {
                       case PropertyValue.INTEGER:
  -                        ((Numeric)prop).multiply
  -                                        ((double)(((IntegerType)pv).getInt()));
  +                        ((Numeric)prop).multiply(((IntegerType)pv).getInt());
                           break inner;
                       case PropertyValue.NUMERIC:
                           ((Numeric)prop).multiply((Numeric)pv);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org