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

Unified Diff: runtime/lib/growable_array.dart

Issue 11144016: Make argument of List.sort optional with default Comparable.compare. (Closed) Base URL: https://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
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index 58ec00cb106452ad3f0b3dab97503f9d8170925f..e332dd1aac8a6489cba621ecf7c86850832f32c5 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -207,7 +207,7 @@ class _GrowableObjectArray<T> implements List<T> {
this.length = 0;
}
- void sort(int compare(T a, T b)) {
+ void sort([Comparator<T> compare = Comparable.compare]) {
DualPivotQuicksort.sort(this, compare);
}

Powered by Google App Engine
This is Rietveld 408576698