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

Unified Diff: runtime/lib/string_base.dart

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Address comments and fix. Created 8 years, 1 month 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: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index 11b594ed9e562cebc71e654acdb8b433678031f5..55c60bb1fb7edbe003452ef9f480e8e2de9dab7d 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -232,7 +232,7 @@ class _StringBase {
*/
static String _interpolate(List values) {
int numValues = values.length;
- var stringList = new List(numValues);
+ var stringList = new List.fixedLength(numValues);
for (int i = 0; i < numValues; i++) {
stringList[i] = values[i].toString();
}
@@ -295,7 +295,7 @@ class _StringBase {
List<String> splitChars() {
int len = this.length;
- final result = new List<String>(len);
+ final result = new List<String>.fixedLength(len);
for (int i = 0; i < len; i++) {
result[i] = this[i];
}
@@ -304,7 +304,7 @@ class _StringBase {
List<int> get charCodes {
int len = this.length;
- final result = new List<int>(len);
+ final result = new List<int>.fixedLength(len);
for (int i = 0; i < len; i++) {
result[i] = this.charCodeAt(i);
}
@@ -324,7 +324,7 @@ class _StringBase {
List stringsList = strings;
if (separator.length != 0) {
- stringsList = new List(2 * length - 1);
+ stringsList = new List.fixedLength(2 * length - 1);
stringsList[0] = strings[0];
int j = 1;
for (int i = 1; i < length; i++) {

Powered by Google App Engine
This is Rietveld 408576698