Commit: e1bdf5333d7a7af7c9f6fc2e9fef0b44b69c0c3a
Author: Bastien Montagne
Date: Wed Feb 11 22:08:36 2015 +0100
Branches: master
https://developer.blender.org/rBe1bdf5333d7a7af7c9f6fc2e9fef0b44b69c0c3a
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.
===================================================================
M source/blender/blenlib/BLI_utildefines.h
===================================================================
diff --git a/source/blender/blenlib/BLI_utildefines.h
b/source/blender/blenlib/BLI_utildefines.h
index b1b2250..f8f654f 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
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs