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

Unified Diff: sdk/lib/collection/splay_tree.dart

Issue 288103003: Change Set.toSet to always return a set with the same behavior. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update html5lib pubspec version to 0.12.0-dev Created 6 years, 7 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
Index: sdk/lib/collection/splay_tree.dart
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index 8e2f5930eff58f4928cc88bcafc1996a6ecf6151..3b9adecaba5014f64a835d1ad25bc47e8bc45688 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -785,7 +785,7 @@ class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>
}
Set<E> intersection(Set<E> other) {
- Set<E> result = new SplayTreeSet<E>(_compare, _validKey);
+ Set<E> result = new SplayTreeSet<E>(_comparator, _validKey);
for (E element in this) {
if (other.contains(element)) result.add(element);
}
@@ -793,7 +793,7 @@ class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>
}
Set<E> difference(Set<E> other) {
- Set<E> result = new SplayTreeSet<E>(_compare, _validKey);
+ Set<E> result = new SplayTreeSet<E>(_comparator, _validKey);
for (E element in this) {
if (!other.contains(element)) result.add(element);
}
@@ -805,7 +805,7 @@ class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>
}
SplayTreeSet<E> _clone() {
- var set = new SplayTreeSet<E>(_compare, _validKey);
+ var set = new SplayTreeSet<E>(_comparator, _validKey);
set._count = _count;
set._root = _cloneNode(_root);
return set;
@@ -825,4 +825,6 @@ class SplayTreeSet<E> extends _SplayTree<E> with IterableMixin<E>
}
void clear() { _clear(); }
+
+ Set<E> toSet() => _clone();
}

Powered by Google App Engine
This is Rietveld 408576698