Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: runtime/lib/integers.dart

Issue 9692068: Fixed some static type warnings in vm core libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed byte_array.dart changes - test failed Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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]]);
}
« no previous file with comments | « runtime/lib/immutable_map.dart ('k') | runtime/lib/regexp.dart » ('j') | runtime/lib/regexp.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698