summaryrefslogtreecommitdiff
path: root/lib/nes/common/debug.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-02-04 23:11:08 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-02-04 23:11:08 +0100
commit79553ab1fa3d707612e80dd03bf95ca65fa0c411 (patch)
treef44bec41548d569cfca43c44e0e4ffa7b72ed4ed /lib/nes/common/debug.hh
parent9c45e9c7df1efa5bc1c8e73b6eaef4726b828d3e (diff)
refactor file browser
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