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

Unified Diff: lib/utf/utf16.dart

Issue 11049036: Remove spurious types from constructor args that use "this." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « no previous file | lib/utf/utf32.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utf/utf16.dart
diff --git a/lib/utf/utf16.dart b/lib/utf/utf16.dart
index 680e4d2a36ea0a61f091b0b937b74dde57bbd81b..29aed2e919b42081af3511e2d3179da1f8922800 100644
--- a/lib/utf/utf16.dart
+++ b/lib/utf/utf16.dart
@@ -208,17 +208,18 @@ List<int> _stringToUtf16CodeUnits(String str) {
}
}
+typedef _ListRangeIterator _CodeUnitsProvider();
+
/**
* Return type of [decodeUtf16AsIterable] and variants. The Iterable type
* provides an iterator on demand and the iterator will only translate bytes
* as requested by the user of the iterator. (Note: results are not cached.)
*/
class IterableUtf16Decoder implements Iterable<int> {
- final Function codeunitsProvider;
+ final _CodeUnitsProvider codeunitsProvider;
final int replacementCodepoint;
- IterableUtf16Decoder._(_ListRangeIterator this.codeunitsProvider(),
- int this.replacementCodepoint);
+ IterableUtf16Decoder._(this.codeunitsProvider, this.replacementCodepoint);
Utf16CodeUnitDecoder iterator() =>
new Utf16CodeUnitDecoder.fromListRangeIterator(codeunitsProvider(),
@@ -235,8 +236,7 @@ class Utf16BytesToCodeUnitsDecoder implements _ListRangeIterator {
final int replacementCodepoint;
Utf16BytesToCodeUnitsDecoder._fromListRangeIterator(
- _ListRangeIterator this.utf16EncodedBytesIterator,
- int this.replacementCodepoint);
+ this.utf16EncodedBytesIterator, this.replacementCodepoint);
factory Utf16BytesToCodeUnitsDecoder(List<int> utf16EncodedBytes, [
int offset = 0, int length,
« no previous file with comments | « no previous file | lib/utf/utf32.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698