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:
@@ -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
|
||||
|
Reference in New Issue
Block a user