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

Unified Diff: lib/html/src/_ListIterators.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/html/src/_Collections.dart ('k') | lib/utf/utf16.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/src/_ListIterators.dart
diff --git a/lib/html/src/_ListIterators.dart b/lib/html/src/_ListIterators.dart
index 2eb9acc592ea56f37273e873fbcef1b2d099f80f..039eda61c645951468972ba5abc0c40892e79406 100644
--- a/lib/html/src/_ListIterators.dart
+++ b/lib/html/src/_ListIterators.dart
@@ -8,7 +8,7 @@ class _FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
: super(array),
_length = array.length;
- bool hasNext() => _length > _pos;
+ bool get hasNext => _length > _pos;
final int _length; // Cache array length for faster access.
}
@@ -19,10 +19,10 @@ class _VariableSizeListIterator<T> implements Iterator<T> {
: _array = array,
_pos = 0;
- bool hasNext() => _array.length > _pos;
+ bool get hasNext => _array.length > _pos;
T next() {
- if (!hasNext()) {
+ if (!hasNext) {
throw const NoMoreElementsException();
}
return _array[_pos++];
« no previous file with comments | « lib/html/src/_Collections.dart ('k') | lib/utf/utf16.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698