diff options
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h index 18dc414..019ceaf 100644 --- a/src/config.h +++ b/src/config.h @@ -38,4 +38,16 @@ typedef struct{ typedef i32 b32; #define false 0 -#define true 1
\ No newline at end of file +#define true 1 + +#ifdef DEBUG +# if __GNUC__ +# define assert(c) if (!(c)) __builtin_trap() +# elif _MSC_VER +# define assert(c) if (!(c)) __debugbreak() +# else +# define assert(c) if (!(c)) *(volatile int *)0 = 0 +# endif +#else +# define assert(c) +#endif
\ No newline at end of file |
