diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-12 00:08:36 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-12 00:10:09 +0300 |
commit | e1bdf5333d7a7af7c9f6fc2e9fef0b44b69c0c3a (patch) | |
tree | fd292fce63fa10eabe9fe34094dc19d411a5caa1 /source/blender/blenlib | |
parent | fbe5282c1ec4570a437f29192f8b295e384b2555 (diff) |
Add new UNUSED_VARS_DEBUG utils, which is NOP in debug build, but tags given vars as unused in non-debug builds.
Helps handling cleanly pure-debug variables.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index b1b225096a7..f8f654fdb7d 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -588,6 +588,13 @@ extern "C" { /* reusable ELEM macro */ #define UNUSED_VARS(...) VA_NARGS_CALL_OVERLOAD(_VA_UNUSED_VARS_, __VA_ARGS__) +/* for debug-only variables */ +#ifndef NDEBUG +# define UNUSED_VARS_DEBUG(...) +#else +# define UNUSED_VARS_DEBUG UNUSED_VARS +#endif + /*little macro so inline keyword works*/ #if defined(_MSC_VER) # define BLI_INLINE static __forceinline |