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

Unified Diff: lib/coreimpl/queue.dart

Issue 11233032: [core] cleanup === and !== (Closed) Base URL: http://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 | « lib/coreimpl/options.dart ('k') | lib/coreimpl/splay_tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/coreimpl/queue.dart
===================================================================
--- lib/coreimpl/queue.dart (revision 13874)
+++ lib/coreimpl/queue.dart (working copy)
@@ -159,7 +159,7 @@
}
bool isEmpty() {
- return (_sentinel._next === _sentinel);
+ return (identical(_sentinel._next, _sentinel));
}
void clear() {
@@ -169,7 +169,7 @@
void forEach(void f(E element)) {
DoubleLinkedQueueEntry<E> entry = _sentinel._next;
- while (entry !== _sentinel) {
+ while (!identical(entry, _sentinel)) {
DoubleLinkedQueueEntry<E> nextEntry = entry._next;
f(entry._element);
entry = nextEntry;
@@ -178,7 +178,7 @@
void forEachEntry(void f(DoubleLinkedQueueEntry<E> element)) {
DoubleLinkedQueueEntry<E> entry = _sentinel._next;
- while (entry !== _sentinel) {
+ while (!identical(entry, _sentinel)) {
DoubleLinkedQueueEntry<E> nextEntry = entry._next;
f(entry);
entry = nextEntry;
@@ -187,7 +187,7 @@
bool every(bool f(E element)) {
DoubleLinkedQueueEntry<E> entry = _sentinel._next;
- while (entry !== _sentinel) {
+ while (!identical(entry, _sentinel)) {
DoubleLinkedQueueEntry<E> nextEntry = entry._next;
if (!f(entry._element)) return false;
entry = nextEntry;
@@ -197,7 +197,7 @@
bool some(bool f(E element)) {
DoubleLinkedQueueEntry<E> entry = _sentinel._next;
- while (entry !== _sentinel) {
+ while (!identical(entry, _sentinel)) {
DoubleLinkedQueueEntry<E> nextEntry = entry._next;
if (f(entry._element)) return true;
entry = nextEntry;
@@ -208,7 +208,7 @@
Queue map(f(E element)) {
Queue other = new Queue();
DoubleLinkedQueueEntry<E> entry = _sentinel._next;
- while (entry !== _sentinel) {
+ while (!identical(entry, _sentinel)) {
DoubleLinkedQueueEntry<E> nextEntry = entry._next;
other.addLast(f(entry._element));
entry = nextEntry;
@@ -224,7 +224,7 @@
Queue<E> filter(bool f(E element)) {
Queue<E> other = new Queue<E>();
DoubleLinkedQueueEntry<E> entry = _sentinel._next;
- while (entry !== _sentinel) {
+ while (!identical(entry, _sentinel)) {
DoubleLinkedQueueEntry<E> nextEntry = entry._next;
if (f(entry._element)) other.addLast(entry._element);
entry = nextEntry;
@@ -250,7 +250,7 @@
}
bool hasNext() {
- return _currentEntry._next !== _sentinel;
+ return !identical(_currentEntry._next, _sentinel);
}
E next() {
« no previous file with comments | « lib/coreimpl/options.dart ('k') | lib/coreimpl/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698