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

Unified Diff: samples/chat/chat_server_lib.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/chat/chat_server_lib.dart
diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart
index 7bbf55242fbbacbc2556ef33318a423de1849543..d60ab8edfa7b76ff57bbfc780b045726f6c3fdc8 100644
--- a/samples/chat/chat_server_lib.dart
+++ b/samples/chat/chat_server_lib.dart
@@ -643,7 +643,7 @@ class Rate {
_currentBucket = 0,
_currentBucketTime = new Date.now().millisecondsSinceEpoch,
_sum = 0 {
- _bucketTimeRange = (_timeRange / buckets).toInt();
+ _bucketTimeRange = (_timeRange / buckets).truncate();
Lasse Reichstein Nielsen 2013/01/04 10:29:42 What happens if _timeRange is negative? This shoul
for (int i = 0; i < _buckets.length; i++) {
_buckets[i] = 0;
}

Powered by Google App Engine
This is Rietveld 408576698