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

Unified Diff: sdk/lib/_collection_dev/iterable.dart

Issue 12391010: Make HashSet.length constant time. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | sdk/lib/collection/hash_set.dart » ('j') | tests/corelib/collection_length_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_collection_dev/iterable.dart
diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart
index 21bdbd1def05a1e93dcd61aee9d2b348d6eb5789..40e2891a5de090b6dbb0be3fd838bd11e9e5a59e 100644
--- a/sdk/lib/_collection_dev/iterable.dart
+++ b/sdk/lib/_collection_dev/iterable.dart
@@ -28,7 +28,7 @@ abstract class ListIterable<E> extends Iterable<E> {
}
}
- bool get isEmpty => length != 0;
+ bool get isEmpty => length == 0;
E get first {
if (length == 0) throw new StateError("No elements");
« no previous file with comments | « no previous file | sdk/lib/collection/hash_set.dart » ('j') | tests/corelib/collection_length_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698