summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-06-12 10:23:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-06-12 10:27:13 -0400
commit453bb6c1b79d6d4fe4b1277336dc0f4097a5ee6b (patch)
treeb8d4627503708b047230c7148dbceae63100a462 /libdimension/dimension
parent399bc22aff7f1042199cbc425d1df5264d1741af (diff)
downloaddimension-453bb6c1b79d6d4fe4b1277336dc0f4097a5ee6b.tar.xz
Use DMNSN_DEBUG macro instead of NDEBUG.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/error.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/libdimension/dimension/error.h b/libdimension/dimension/error.h
index 0ae349f..f07261e 100644
--- a/libdimension/dimension/error.h
+++ b/libdimension/dimension/error.h
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Library. *
* *
@@ -51,15 +51,15 @@
* @param[in] expr The expression to assert.
* @param[in] str A string to print if the assertion fails.
*/
-#ifdef NDEBUG
- #define dmnsn_assert(expr, str) ((void)0)
-#else
+#if DMNSN_DEBUG
#define dmnsn_assert(expr, str) \
do { \
if (!(expr)) { \
dmnsn_error((str)); \
} \
} while (0)
+#else
+ #define dmnsn_assert(expr, str) ((void)0)
#endif
/**
@@ -67,10 +67,10 @@
* Express that a line of code is unreachable.
* @param[in] str A string to print if the line is reached.
*/
-#ifdef NDEBUG
- #define dmnsn_unreachable(str) DMNSN_UNREACHABLE()
-#else
+#if DMNSN_DEBUG
#define dmnsn_unreachable(str) dmnsn_error((str))
+#else
+ #define dmnsn_unreachable(str) DMNSN_UNREACHABLE()
#endif
/**