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:
Diffstat (limited to 'intern/ghost/intern/GHOST_Debug.h')
-rw-r--r--intern/ghost/intern/GHOST_Debug.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h
index e6bdf974d59..ec1a0b34be6 100644
--- a/intern/ghost/intern/GHOST_Debug.h
+++ b/intern/ghost/intern/GHOST_Debug.h
@@ -15,12 +15,12 @@
# endif
#endif
-#ifdef WITH_GHOST_DEBUG
+#if defined(WITH_GHOST_DEBUG) || (!defined(NDEBUG))
# include <iostream>
# include <stdio.h> //for printf()
#endif // WITH_GHOST_DEBUG
-#ifdef WITH_GHOST_DEBUG
+#if defined(WITH_GHOST_DEBUG)
# define GHOST_PRINT(x) \
{ \
std::cout << x; \
@@ -31,10 +31,10 @@
printf(x, __VA_ARGS__); \
} \
(void)0
-#else // WITH_GHOST_DEBUG
+#else
# define GHOST_PRINT(x)
# define GHOST_PRINTF(x, ...)
-#endif // WITH_GHOST_DEBUG
+#endif /* `!defined(WITH_GHOST_DEBUG)` */
#ifdef WITH_ASSERT_ABORT
# include <stdio.h> //for fprintf()
@@ -49,7 +49,8 @@
} \
} \
(void)0
-#elif defined(WITH_GHOST_DEBUG)
+/* Assert in non-release builds too. */
+#elif defined(WITH_GHOST_DEBUG) || (!defined(NDEBUG))
# define GHOST_ASSERT(x, info) \
{ \
if (!(x)) { \
@@ -59,6 +60,6 @@
} \
} \
(void)0
-#else // WITH_GHOST_DEBUG
+#else /* `defined(WITH_GHOST_DEBUG) || (!defined(NDEBUG))` */
# define GHOST_ASSERT(x, info) ((void)0)
-#endif // WITH_GHOST_DEBUG
+#endif /* `defined(WITH_GHOST_DEBUG) || (!defined(NDEBUG))` */