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.
This commit is contained in:
Bastien Montagne
2015-02-11 22:08:36 +01:00
parent fbe5282c1e
commit e1bdf5333d

View File

@@ -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