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

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

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. 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 | « utils/pub/git_source.dart ('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 de90cf5b43e21006d1a8506102f4066bf6e4344e..f29c4f994d16ea86d07a45583c2d5df6af2965d7 100644
--- a/utils/tests/string_encoding/benchmark_runner.dart
+++ b/utils/tests/string_encoding/benchmark_runner.dart
@@ -168,15 +168,13 @@ class TestReport {
}
String _leftAlign(String s, int width) {
- List<int> outCodes = [];
- outCodes.insertRange(0, width, spaceChar);
+ List<int> outCodes = new List<int>.filled(width, spaceChar);
outCodes.setRange(0, Math.min(width, s.length), s.codeUnits);
return new String.fromCharCodes(outCodes);
}
String _rightAlign(String s, int width) {
- List<int> outCodes = [];
- outCodes.insertRange(0, width, spaceChar);
+ List<int> outCodes = new List<int>.filled(width, spaceChar);
int fromIndex = Math.max(0, width - s.length);
int length = Math.min(width, s.length);
outCodes.setRange(fromIndex, fromIndex + length, s.codeUnits);
« no previous file with comments | « utils/pub/git_source.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698