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

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

Issue 2754013002: Format all dart: library files (Closed)
Patch Set: Format all dart: library files Created 3 years, 9 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/collection/splay_tree.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 c954e643bab8c9bac377d9babff622637e4d8267..6634f9ef052e4db70733bc72a99adcb02d8646f7 100644
--- a/sdk/lib/convert/ascii.dart
+++ b/sdk/lib/convert/ascii.dart
@@ -51,7 +51,7 @@ class AsciiCodec extends Encoding {
* If [allowInvalid] is not provided, it defaults to the value used to create
* this [AsciiCodec].
*/
- String decode(List<int> bytes, { bool allowInvalid }) {
+ String decode(List<int> bytes, {bool allowInvalid}) {
if (allowInvalid == null) allowInvalid = _allowInvalid;
if (allowInvalid) {
return const AsciiDecoder(allowInvalid: true).convert(bytes);
@@ -62,16 +62,15 @@ class AsciiCodec extends Encoding {
AsciiEncoder get encoder => const AsciiEncoder();
- AsciiDecoder get decoder =>
- _allowInvalid ? const AsciiDecoder(allowInvalid: true)
- : const AsciiDecoder(allowInvalid: false);
+ AsciiDecoder get decoder => _allowInvalid
+ ? const AsciiDecoder(allowInvalid: true)
+ : const AsciiDecoder(allowInvalid: false);
}
// Superclass for [AsciiEncoder] and [Latin1Encoder].
// Generalizes common operations that only differ by a mask;
class _UnicodeSubsetEncoder extends Converter<String, List<int>>
implements ChunkedConverter<String, List<int>, String, List<int>> {
-
final int _subsetMask;
const _UnicodeSubsetEncoder(this._subsetMask);
@@ -158,7 +157,6 @@ class _UnicodeSubsetEncoderSink extends StringConversionSinkBase {
*/
abstract class _UnicodeSubsetDecoder extends Converter<List<int>, String>
implements ChunkedConverter<List<int>, String, List<int>, String> {
-
final bool _allowInvalid;
final int _subsetMask;
@@ -271,7 +269,7 @@ class _ErrorHandlingAsciiDecoderSink extends ByteConversionSinkBase {
if ((source[i] & ~_ASCII_MASK) != 0) {
if (i > start) _utf8Sink.addSlice(source, start, i, false);
// Add UTF-8 encoding of U+FFFD.
- _utf8Sink.add(const<int>[0xEF, 0xBF, 0xBD]);
+ _utf8Sink.add(const <int>[0xEF, 0xBF, 0xBD]);
start = i + 1;
}
}
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | sdk/lib/convert/byte_conversion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698