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

Unified Diff: samples/third_party/dromaeo/common/BenchUtil.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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: samples/third_party/dromaeo/common/BenchUtil.dart
diff --git a/samples/third_party/dromaeo/common/BenchUtil.dart b/samples/third_party/dromaeo/common/BenchUtil.dart
index 2d0a487bf63e9f539f78f97782968ada6eab0456..1bc419ee0a99f6ffcb420f2cdc8cfc7012c7bd9c 100644
--- a/samples/third_party/dromaeo/common/BenchUtil.dart
+++ b/samples/third_party/dromaeo/common/BenchUtil.dart
@@ -23,7 +23,7 @@ class BenchUtil {
static void shuffle(List<Object> list) {
int len = list.length - 1;
for (int i = 0; i < len; i++) {
- int index = (Math.random() * (len - i)).toInt() + i;
+ int index = (Math.random() * (len - i)).truncate() + i;
Object tmp = list[i];
list[i] = list[index];
list[index] = tmp;

Powered by Google App Engine
This is Rietveld 408576698