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

Side by Side Diff: sdk/lib/convert/latin1.dart

Issue 23245018: Add missing parameter to function call in latin1.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.convert; 5 part of dart.convert;
6 6
7 /** 7 /**
8 * An instance of the default implementation of the [Latin1Codec]. 8 * An instance of the default implementation of the [Latin1Codec].
9 * 9 *
10 * This instance provides a convenient access to the most common ISO Latin 1 10 * This instance provides a convenient access to the most common ISO Latin 1
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 void addSlice(List<int> source, int start, int end, bool isLast) { 242 void addSlice(List<int> source, int start, int end, bool isLast) {
243 if (start < 0 || start > source.length) { 243 if (start < 0 || start > source.length) {
244 throw new RangeError.range(start, 0, source.length); 244 throw new RangeError.range(start, 0, source.length);
245 } 245 }
246 if (end < start || end > source.length) { 246 if (end < start || end > source.length) {
247 throw new RangeError.range(end, start, source.length); 247 throw new RangeError.range(end, start, source.length);
248 } 248 }
249 for (int i = start; i < end; i++) { 249 for (int i = start; i < end; i++) {
250 if ((source[i] & ~0xFF) != 0) { 250 if ((source[i] & ~0xFF) != 0) {
251 if (_allowInvalid) { 251 if (_allowInvalid) {
252 if (i > start) _addSliceToSink(source, start, i); 252 if (i > start) _addSliceToSink(source, start, i, false);
253 // Add UTF-8 encoding of U+FFFD. 253 // Add UTF-8 encoding of U+FFFD.
254 _addSliceToSink(const[0xFFFD], 0, 1, false); 254 _addSliceToSink(const[0xFFFD], 0, 1, false);
255 start = i + 1; 255 start = i + 1;
256 } else { 256 } else {
257 throw new FormatException("Source contains non-Latin-1 characters."); 257 throw new FormatException("Source contains non-Latin-1 characters.");
258 } 258 }
259 } 259 }
260 } 260 }
261 if (start < end) { 261 if (start < end) {
262 _addSliceToSink(source, start, end, isLast); 262 _addSliceToSink(source, start, end, isLast);
263 } else if (isLast) { 263 } else if (isLast) {
264 close(); 264 close();
265 } 265 }
266 } 266 }
267 } 267 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698