summaryrefslogtreecommitdiff
path: root/lib/nes/common/debug.hh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nes/common/debug.hh')
-rw-r--r--lib/nes/common/debug.hh18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/nes/common/debug.hh b/lib/nes/common/debug.hh
index 409d55a..30370e9 100644
--- a/lib/nes/common/debug.hh
+++ b/lib/nes/common/debug.hh
@@ -5,11 +5,25 @@
#include <spdlog/spdlog.h>
#define NES_DEBUG_LOG(name, ...) \
- spdlog::info("[" #name "] " __VA_ARGS__)
+ spdlog::info("[" #name "] " __VA_ARGS__)
#else
#define NES_DEBUG_LOG(name, fmt, ...) \
- (void)0
+ (void)0
+
+#endif
+
+#ifdef NDEBUG
+
+#define NES_ASSERT(...) \
+ (void)0
+
+#else
+
+#include <cassert>
+
+#define NES_ASSERT(...) \
+ assert(__VA_ARGS__)
#endif \ No newline at end of file