aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTemplates.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkTemplates.h')
-rw-r--r--include/core/SkTemplates.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h
index 42e9943dec..c4ba0e676a 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -20,6 +20,12 @@
*/
/**
+ * Marks a local variable as known to be unused (to avoid warnings).
+ * Note that this does *not* prevent the local variable from being optimized away.
+ */
+template<typename T> inline void sk_ignore_unused_variable(const T&) { }
+
+/**
* SkTIsConst<T>::value is true if the type T is const.
* The type T is constrained not to be an array or reference type.
*/