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

Unified Diff: sdk/lib/convert/ascii.dart

Issue 499073003: Use Uint8List for byte lists in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | « sdk/lib/_internal/lib/convert_patch.dart ('k') | sdk/lib/convert/byte_conversion.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/ascii.dart
diff --git a/sdk/lib/convert/ascii.dart b/sdk/lib/convert/ascii.dart
index dd3c39c7687d9c5895eea99eb897bd1a6a5af0b6..281233a57155200ffa1ed854f323772d63ac6190 100644
--- a/sdk/lib/convert/ascii.dart
+++ b/sdk/lib/convert/ascii.dart
@@ -75,8 +75,7 @@ class _UnicodeSubsetEncoder extends Converter<String, List<int>> {
const _UnicodeSubsetEncoder(this._subsetMask);
List<int> convert(String string) {
- // TODO(11971): Use Uint8List when possible.
- List result = new List<int>(string.length);
+ List result = new Uint8List(string.length);
for (int i = 0; i < string.length; i++) {
var codeUnit = string.codeUnitAt(i);
if ((codeUnit & ~_subsetMask) != 0) {
« no previous file with comments | « sdk/lib/_internal/lib/convert_patch.dart ('k') | sdk/lib/convert/byte_conversion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698