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

Unified Diff: lib/utf/utf_core.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. 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 | « lib/utf/utf8.dart ('k') | pkg/dartdoc/lib/mirrors_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utf/utf_core.dart
diff --git a/lib/utf/utf_core.dart b/lib/utf/utf_core.dart
index 32f3f847960f156b6b43c8ca7408e87d028fc23c..39d868a68ec0505c57d5d3dfd555317f15d5af28 100644
--- a/lib/utf/utf_core.dart
+++ b/lib/utf/utf_core.dart
@@ -124,7 +124,7 @@ List<int> _utf16CodeUnitsToCodepoints(
.fromListRangeIterator(source, replacementCodepoint);
List<int> codepoints = new List<int>(source.remaining);
int i = 0;
- while (decoder.hasNext()) {
+ while (decoder.hasNext) {
codepoints[i++] = decoder.next();
}
if (i == codepoints.length) {
@@ -158,7 +158,7 @@ class Utf16CodeUnitDecoder implements Iterator<int> {
Iterator<int> iterator() => this;
- bool hasNext() => utf16CodeUnitIterator.hasNext();
+ bool get hasNext => utf16CodeUnitIterator.hasNext;
int next() {
int value = utf16CodeUnitIterator.next();
@@ -174,7 +174,7 @@ class Utf16CodeUnitDecoder implements Iterator<int> {
// transfer directly
return value;
} else if (value < UNICODE_UTF16_SURROGATE_UNIT_1_BASE &&
- utf16CodeUnitIterator.hasNext()) {
+ utf16CodeUnitIterator.hasNext) {
// merge surrogate pair
int nextValue = utf16CodeUnitIterator.next();
if (nextValue >= UNICODE_UTF16_SURROGATE_UNIT_1_BASE &&
@@ -241,7 +241,7 @@ class _ListRange implements Iterable {
* and move forward/backward within the iterator.
*/
abstract class _ListRangeIterator implements Iterator<int> {
- bool hasNext();
+ bool hasNext;
int next();
int get position;
void backup([by]);
@@ -256,7 +256,7 @@ class _ListRangeIteratorImpl implements _ListRangeIterator {
_ListRangeIteratorImpl(this._source, this._offset, this._end);
- bool hasNext() => _offset < _end;
+ bool get hasNext => _offset < _end;
int next() => _source[_offset++];
« no previous file with comments | « lib/utf/utf8.dart ('k') | pkg/dartdoc/lib/mirrors_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698