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

Unified Diff: samples/swarm/swarm_ui_lib/view/PagedViews.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/swarm/swarm_ui_lib/view/PagedViews.dart
diff --git a/samples/swarm/swarm_ui_lib/view/PagedViews.dart b/samples/swarm/swarm_ui_lib/view/PagedViews.dart
index 310f554779f55417c9d2d1a9face98185101a35a..7cd229a3f14a1ff87ef92714b75e54699af9fc8e 100644
--- a/samples/swarm/swarm_ui_lib/view/PagedViews.dart
+++ b/samples/swarm/swarm_ui_lib/view/PagedViews.dart
@@ -172,7 +172,7 @@ class PagedColumnView extends View {
if (value.endsWith('px')) {
value = value.substring(0, value.length - 2);
}
- return double.parse(value).round().toInt();
+ return double.parse(value).round();
}
/** Watch for resize and update page count. */
@@ -193,7 +193,7 @@ class PagedColumnView extends View {
window.requestLayoutFrame(() {
if (_container.scrollWidth > _container.offsetWidth) {
pageLength = (_container.scrollWidth / _computePageSize(_container))
- .ceil().toInt();
+ .ceil();
}
pageLength = Math.max(pageLength, 1);
@@ -218,7 +218,7 @@ class PagedColumnView extends View {
window.requestLayoutFrame(() {
num current = scroller.contentOffset.x;
int pageSize = _computePageSize(_container);
- pages.current.value = -(current / pageSize).round().toInt();
+ pages.current.value = -(current / pageSize).round();
});
}
@@ -246,7 +246,7 @@ class PagedColumnView extends View {
pageNumber = pageNumber.round();
}
}
- pageNumber = pageNumber.toInt();
+ pageNumber = pageNumber;
floitsch 2013/03/11 13:39:15 Remove line.
num translate = -pageNumber * pageSize;
pages.current.value = pageNumber;
if (currentTarget != translate) {

Powered by Google App Engine
This is Rietveld 408576698