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

Unified Diff: runtime/lib/byte_array.dart

Issue 11186017: Change sort on scalar arrays to take optional comparison function. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index feadf0e90a7024149f784b45fd33613a80d91da2..dd953f3cc52b5638d34fe4a21e32462487a5d31c 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -181,7 +181,7 @@ abstract class _ByteArrayBase {
"Cannot add to a non-extendable array");
}
- void sort(int compare(a, b)) {
+ void sort([Comparator compare = Comparable.compare]) {
DualPivotQuicksort.sort(this, compare);
}
@@ -1659,7 +1659,7 @@ class _ByteArrayViewBase {
"Cannot add to a non-extendable array");
}
- void sort(int compare(a, b)) {
+ void sort([Comparator compare = Comparable.compare]) {
DualPivotQuicksort.sort(this, compare);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698