diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-04 15:58:08 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-04 15:58:08 +0000 |
commit | 7de18e5c7b4e4a8ad8910b1016688ded902f185b (patch) | |
tree | 400e622ac01b82e67a5daba166931e65a33fd3e7 /include/core/SkTemplates.h | |
parent | c1f9011ceba380967cde2019b352f963f90f9589 (diff) |
Add sk_ignore_unused_variable to avoid warnings.
https://codereview.appspot.com/7218045/
git-svn-id: http://skia.googlecode.com/svn/trunk@7539 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkTemplates.h')
-rw-r--r-- | include/core/SkTemplates.h | 6 |
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. */ |