summaryrefslogtreecommitdiff
path: root/src/assert.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/assert.hh')
-rw-r--r--src/assert.hh12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/assert.hh b/src/assert.hh
index 182b58a4..52bdcf48 100644
--- a/src/assert.hh
+++ b/src/assert.hh
@@ -16,8 +16,14 @@ void on_assert_failed(const char* message);
#undef assert
#endif
-#define assert(condition) \
- if (not (condition)) \
- on_assert_failed("assert failed \"" #condition "\" at " __FILE__ ":" TOSTRING(__LINE__))
+#ifdef KAK_DEBUG
+ #define assert(condition) \
+ if (not (condition)) \
+ on_assert_failed("assert failed \"" #condition \
+ "\" at " __FILE__ ":" TOSTRING(__LINE__))
+#else
+ #define assert(condition)
+#endif
+
#endif // assert_hh_INCLUDED