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

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

Issue 2698353003: unfork DDC's copy of most SDK libraries (Closed)
Patch Set: revert core_patch Created 3 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 | « sdk/lib/async/stream_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/list.dart
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index b81b8dd7c11fc2180336f577443e4a92fe3b66d7..ad133cbad5ea3a815f62c4e663bd4976a5d17130 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -274,10 +274,8 @@ abstract class ListMixin<E> implements List<E> {
_filter(this, test, true);
}
- static void _filter(List source,
- bool test(var element),
- bool retainMatching) {
- List retained = [];
+ void _filter(List source, bool test(var element), bool retainMatching) {
Lasse Reichstein Nielsen 2017/02/28 14:55:05 Now that this is no longer a static method, the fi
Jennifer Messerly 2017/02/28 23:46:16 ah good catch! I made this fix over at: https://co
+ List<E> retained = <E>[];
int length = source.length;
for (int i = 0; i < length; i++) {
var element = source[i];
@@ -309,7 +307,7 @@ abstract class ListMixin<E> implements List<E> {
void sort([int compare(E a, E b)]) {
if (compare == null) {
- Sort.sort(this, Comparable.compare);
+ Sort.sort(this, (a, b) => Comparable.compare(a, b));
} else {
Sort.sort(this, compare);
}
« no previous file with comments | « sdk/lib/async/stream_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698