Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-12 00:08:36 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-12 00:10:09 +0300
commite1bdf5333d7a7af7c9f6fc2e9fef0b44b69c0c3a (patch)
treefd292fce63fa10eabe9fe34094dc19d411a5caa1 /source/blender/blenlib
parentfbe5282c1ec4570a437f29192f8b295e384b2555 (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.h7
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