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

Unified Diff: client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart

Issue 8424012: Add optional arguments to our indexOf/lastIndexOf methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | client/dom/generated/src/wrapping/_HTMLCollectionWrappingImplementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart
===================================================================
--- client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart (revision 942)
+++ client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart (working copy)
@@ -42,12 +42,13 @@
throw new UnsupportedOperationException("This object is immutable.");
}
- int indexOf(int element, int startIndex) {
+ int indexOf(int element, [int startIndex = 0]) {
return _Lists.indexOf(this, element, startIndex, this.length);
}
- int lastIndexOf(int element, int startIndex) {
- return _Lists.lastIndexOf(this, element, startIndex);
+ int lastIndexOf(int element, [int fromIndex = null]) {
kasperl 2011/10/31 12:35:09 Why is this called fromIndex in lastIndexOf and st
+ if (fromIndex === null) fromIndex = length - 1;
+ return _Lists.lastIndexOf(this, element, fromIndex);
}
int clear() {
« no previous file with comments | « no previous file | client/dom/generated/src/wrapping/_HTMLCollectionWrappingImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698