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

Unified Diff: include/core/SkTArray.h

Issue 726923002: Enable unused param checking for public includes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix errors Created 6 years, 1 month 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: include/core/SkTArray.h
diff --git a/include/core/SkTArray.h b/include/core/SkTArray.h
index 06a85bc439595b0fe8cb081c085a68761cfda16f..9929a8b5036e5c0649ffdce4418945179abddb20 100644
--- a/include/core/SkTArray.h
+++ b/include/core/SkTArray.h
@@ -464,11 +464,10 @@ private:
// Use the below macro (SkNEW_APPEND_TO_TARRAY) rather than calling this directly
template <typename T, bool MEM_COPY>
-void* operator new(size_t, SkTArray<T, MEM_COPY>* array, int atIndex) {
+void* operator new(size_t, SkTArray<T, MEM_COPY>* array, int /*atIndex*/) {
// Currently, we only support adding to the end of the array. When the array class itself
// supports random insertion then this should be updated.
// SkASSERT(atIndex >= 0 && atIndex <= array->count());
- SkASSERT(atIndex == array->count());
mtklein 2014/11/14 16:30:15 This seems like a loss. Seems better to SkDEBUGCO
djsollen 2014/11/14 18:55:23 Done.
return array->push_back_raw(1);
}
@@ -476,7 +475,7 @@ void* operator new(size_t, SkTArray<T, MEM_COPY>* array, int atIndex) {
// to match the op new silences warnings about missing op delete when a constructor throws an
// exception.
template <typename T, bool MEM_COPY>
-void operator delete(void*, SkTArray<T, MEM_COPY>* array, int atIndex) {
+void operator delete(void*, SkTArray<T, MEM_COPY>* /*array*/, int /*atIndex*/) {
SK_CRASH();
}

Powered by Google App Engine
This is Rietveld 408576698