Chromium Code Reviews| Index: runtime/lib/integers.dart |
| diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart |
| index 4d4759134b6a7ba6d6d4c4f6d76118fbc32193c7..102b597c1241914ba285f3a3eda0df23bb328782 100644 |
| --- a/runtime/lib/integers.dart |
| +++ b/runtime/lib/integers.dart |
| @@ -141,8 +141,7 @@ class IntegerImplementation { |
| if ((radix <= 1) || (radix > 16)) { |
| throw "Bad radix: $radix"; |
| } |
| - final bool isNegative = this < 0; |
| - var value = isNegative ? -this : this; |
| + var value = this.isNegative() ? -this : this; |
|
Ivan Posva
2012/03/14 05:34:05
Please maintain the code as it was with a local va
zundel
2012/03/14 13:04:34
np, I'll revert this.
Background: the shadowing
|
| List temp = new List(); |
| while (value > 0) { |
| var digit = value % radix; |
| @@ -153,7 +152,7 @@ class IntegerImplementation { |
| return "0"; |
| } |
| StringBuffer buffer = new StringBuffer(); |
| - if (isNegative) buffer.add("-"); |
| + if (this.isNegative()) buffer.add("-"); |
| for (int i = temp.length - 1; i >= 0; i--) { |
| buffer.add(table[temp[i]]); |
| } |