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

Unified Diff: lib/utf/utf8.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/utf32.dart ('k') | lib/utf/utf_core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utf/utf8.dart
diff --git a/lib/utf/utf8.dart b/lib/utf/utf8.dart
index 610aa72bb3b6387792503d94b15f7dd097406c96..48933af99f435572079a9a0a79e49397b5111d69 100644
--- a/lib/utf/utf8.dart
+++ b/lib/utf/utf8.dart
@@ -170,7 +170,7 @@ class Utf8Decoder implements Iterator<int> {
List<int> decodeRest() {
List<int> codepoints = new List<int>(utf8EncodedBytesIterator.remaining);
int i = 0;
- while (hasNext()) {
+ while (hasNext) {
codepoints[i++] = next();
}
if (i == codepoints.length) {
@@ -182,7 +182,7 @@ class Utf8Decoder implements Iterator<int> {
}
}
- bool hasNext() => utf8EncodedBytesIterator.hasNext();
+ bool get hasNext => utf8EncodedBytesIterator.hasNext;
int next() {
int value = utf8EncodedBytesIterator.next();
@@ -226,7 +226,7 @@ class Utf8Decoder implements Iterator<int> {
"Invalid UTF8 at ${utf8EncodedBytesIterator.position}");
}
int j = 0;
- while (j < additionalBytes && utf8EncodedBytesIterator.hasNext()) {
+ while (j < additionalBytes && utf8EncodedBytesIterator.hasNext) {
int nextValue = utf8EncodedBytesIterator.next();
if (nextValue > _UTF8_ONE_BYTE_MAX &&
nextValue < _UTF8_FIRST_BYTE_OF_TWO_BASE) {
« no previous file with comments | « lib/utf/utf32.dart ('k') | lib/utf/utf_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698