hassert macro
This commit is contained in:
parent
059953fe58
commit
fe52cb6ea9
7
hyper.h
7
hyper.h
|
@ -763,6 +763,13 @@ static const color_t NOCOLOR = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// assert macro
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define hassert(condition) if(!condition) __builtin_unreachable()
|
||||||
|
#else
|
||||||
|
#define hassert(condition) if(condition) println(hlog, __FILE__, ":", __LINE__, ":", __func__, ": assertion failed: ", condition)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IS(z) = z
|
#define IS(z) = z
|
||||||
#include "autohdr.h"
|
#include "autohdr.h"
|
||||||
#undef IS
|
#undef IS
|
||||||
|
|
Loading…
Reference in New Issue