major rework
This commit is contained in:
13
engine-macros.h
Normal file
13
engine-macros.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#define STR(x) #x
|
||||
|
||||
#if !defined(NDEBUG) && defined(USE_PRINTF)
|
||||
#define assuming(expr) \
|
||||
((expr) ? 0 : (fprintf(stderr, "assumption <" #expr "> failed on line %d\n", __LINE__), __builtin_trap(), 0))
|
||||
#elif !defined(NDEBUG)
|
||||
#define assuming(expr) \
|
||||
((expr) ? 0 : (__builtin_trap(), 0))
|
||||
#else
|
||||
#define assuming(expr) ((expr) ? 0 : (__builtin_unreachable(), 0))
|
||||
#endif
|
||||
Reference in New Issue
Block a user