diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-25 17:51:11 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-25 17:51:11 +0100 |
| commit | bd2545347438f3aafc5cc2985c44d5da002c49c9 (patch) | |
| tree | 58f52777381ea5b3c980074a205626a7345c2e62 /cheesemap.h | |
| parent | 09cc68402bb74152a141105b2997ca4072d8d55c (diff) | |
guard assert
Diffstat (limited to 'cheesemap.h')
| -rw-r--r-- | cheesemap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cheesemap.h b/cheesemap.h index a309741..f80ba9d 100644 --- a/cheesemap.h +++ b/cheesemap.h @@ -16,11 +16,15 @@ extern "C" { _Noreturn void CM_PANIC_SYM(const char* file, uint32_t line, const char* fmt, ...); +#ifdef NDEBUG +#define cm_assert(cond) +#else #define cm_assert(cond) \ do { \ if (!(cond)) \ CM_PANIC_SYM(__FILE__, __LINE__, "cm_assertion failed: %s", #cond); \ } while (0) +#endif #ifdef CM_ENABLE_SSE2 #include <emmintrin.h> |
