diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-23 17:12:03 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-23 17:12:23 +0100 |
| commit | 1e5f6cbb08e449c6367a63f6c1bf1cad5e10b5ed (patch) | |
| tree | 45551d8a043b36602a631ffab2ca21c2eb3bc000 /cheesemap.h | |
| parent | 34f55e80f4a58d624e85a814c8809318c3af2e9e (diff) | |
fixing the assert dilema
fix
Diffstat (limited to 'cheesemap.h')
| -rw-r--r-- | cheesemap.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cheesemap.h b/cheesemap.h index 5d87a6c..d17a8f5 100644 --- a/cheesemap.h +++ b/cheesemap.h @@ -13,7 +13,16 @@ extern "C" { #include <stdbool.h> #include <stdint.h> -#ifdef CM_SSE2 +_Noreturn void CM_OPT_PANIC_NAME(const char* file, uint32_t line, + const char* fmt, ...); + +#define cm_assert(cond) \ + do { \ + if (!(cond)) \ + CM_OPT_PANIC_NAME(__FILE__, __LINE__, "cm_assertion failed: %s", #cond); \ + } while (0) + +#ifdef CM_OPT_ENABLE_SSE2 #include <emmintrin.h> typedef __m128i group_t; |
