harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r815664 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java
Date Wed, 16 Sep 2009 08:28:21 GMT
Author: regisxu
Date: Wed Sep 16 08:28:20 2009
New Revision: 815664

URL: http://svn.apache.org/viewvc?rev=815664&view=rev
Log:
replace multiplier 10 with bit move in Integer.toString()

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java?rev=815664&r1=815663&r2=815664&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java Wed
Sep 16 08:28:20 2009
@@ -501,7 +501,7 @@
             int quot = positive_value;
             do {
                 int res = quot / 10;
-                int digit_value = quot - (res * 10);
+                int digit_value = quot - ((res << 3) + (res << 1));
                 digit_value += '0';
                 buffer[last_digit++] = (char) digit_value;
                 quot = res;



Mime
View raw message