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

Unified Diff: sdk/lib/utf/utf_core.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 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: sdk/lib/utf/utf_core.dart
diff --git a/sdk/lib/utf/utf_core.dart b/sdk/lib/utf/utf_core.dart
index d733b53198e5af29733c4d3c9cd6e0bdc557473f..30ad2dca62bc8b12a853f5ba5098b2d37aaa9341 100644
--- a/sdk/lib/utf/utf_core.dart
+++ b/sdk/lib/utf/utf_core.dart
@@ -64,7 +64,7 @@ List<int> _codepointsToUtf16CodeUnits(
}
}
- List<int> codeUnitsBuffer = new List<int>.fixedLength(encodedLength);
+ List<int> codeUnitsBuffer = new List<int>(encodedLength);
int j = 0;
for (int value in listRange) {
if ((value >= 0 && value < UNICODE_UTF16_RESERVED_LO) ||
@@ -96,7 +96,7 @@ List<int> _utf16CodeUnitsToCodepoints(
(new _ListRange(utf16CodeUnits, offset, length)).iterator;
Utf16CodeUnitDecoder decoder = new Utf16CodeUnitDecoder
.fromListRangeIterator(source, replacementCodepoint);
- List<int> codepoints = new List<int>.fixedLength(source.remaining);
+ List<int> codepoints = new List<int>(source.remaining);
int i = 0;
while (decoder.moveNext()) {
codepoints[i++] = decoder.current;
@@ -104,7 +104,7 @@ List<int> _utf16CodeUnitsToCodepoints(
if (i == codepoints.length) {
return codepoints;
} else {
- List<int> codepointTrunc = new List<int>.fixedLength(i);
+ List<int> codepointTrunc = new List<int>(i);
codepointTrunc.setRange(0, i, codepoints);
return codepointTrunc;
}

Powered by Google App Engine
This is Rietveld 408576698