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

Unified Diff: utils/tests/string_encoding/benchmark_runner.dart

Issue 13863012: Refactor List.setRange function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 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
« no previous file with comments | « tools/dom/templates/immutable_list_mixin.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/string_encoding/benchmark_runner.dart
diff --git a/utils/tests/string_encoding/benchmark_runner.dart b/utils/tests/string_encoding/benchmark_runner.dart
index 0463030308a03a0f6fb2b6333d0d1642ffd7f6d8..de90cf5b43e21006d1a8506102f4066bf6e4344e 100644
--- a/utils/tests/string_encoding/benchmark_runner.dart
+++ b/utils/tests/string_encoding/benchmark_runner.dart
@@ -177,8 +177,9 @@ class TestReport {
String _rightAlign(String s, int width) {
List<int> outCodes = [];
outCodes.insertRange(0, width, spaceChar);
- outCodes.setRange(Math.max(0, width - s.length), Math.min(width, s.length),
- s.codeUnits);
+ int fromIndex = Math.max(0, width - s.length);
+ int length = Math.min(width, s.length);
+ outCodes.setRange(fromIndex, fromIndex + length, s.codeUnits);
return new String.fromCharCodes(outCodes);
}
« no previous file with comments | « tools/dom/templates/immutable_list_mixin.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698