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

Unified Diff: lib/src/list_proxy.dart

Issue 1971923002: Make package:html strong clean (Closed) Base URL: git@github.com:dart-lang/html.git@master
Patch Set: Created 4 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
« no previous file with comments | « lib/src/encoding_parser.dart ('k') | lib/src/query_selector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/list_proxy.dart
diff --git a/lib/src/list_proxy.dart b/lib/src/list_proxy.dart
index 99acdb6733387d18b85f22922d28a9c9e0519511..5df1ed44f3db49a1179b10e3604383563f35c455 100644
--- a/lib/src/list_proxy.dart
+++ b/lib/src/list_proxy.dart
@@ -20,11 +20,14 @@ class ListProxy<E> extends IterableBase<E> implements List<E> {
// TODO(jmesserly): This should be on List.
// See http://code.google.com/p/dart/issues/detail?id=947
- bool remove(E item) {
- int i = indexOf(item);
- if (i == -1) return false;
- removeAt(i);
- return true;
+ bool remove(Object item) {
+ if (item is E) {
+ int i = indexOf(item);
+ if (i == -1) return false;
+ removeAt(i);
+ return true;
+ }
+ return false;
}
void insert(int index, E item) => _list.insert(index, item);
@@ -81,7 +84,7 @@ class ListProxy<E> extends IterableBase<E> implements List<E> {
List<E> getRange(int start, int end) => _list.getRange(start, end);
- void setRange(int start, int length, List<E> from, [int startFrom = 0]) {
+ void setRange(int start, int length, Iterable<E> from, [int startFrom = 0]) {
_list.setRange(start, length, from, startFrom);
}
void removeRange(int start, int length) {
« no previous file with comments | « lib/src/encoding_parser.dart ('k') | lib/src/query_selector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698