summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-28 03:12:39 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-28 03:12:39 +0200
commit63cad921af8bb3dddb0fea825df9c6ba78dfaf80 (patch)
tree8f22276afd9b25ed5ce2af371a5a5307a534008e
parentfd19f2e15313fba83e971f49092f5511ac610584 (diff)
add debug assert function
-rw-r--r--compat/assert.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/assert.hpp b/compat/assert.hpp
index 3a6fed34..a96b9e03 100644
--- a/compat/assert.hpp
+++ b/compat/assert.hpp
@@ -53,6 +53,12 @@ namespace floormat {
} \
} while(false)
+#ifndef FM_NO_DEBUG
+#define fm_assert_debug(...) fm_assert(__VA_ARGS__)
+#else
+#define fm_assert_debug(...) void()
+#endif
+
#define ASSERT_EXPR(var, expr, cond) \
([&] { \
decltype(auto) var = (expr); \