use defines for unreachable
This commit is contained in:
parent
c998e946aa
commit
6e16dfa5e5
2 changed files with 11 additions and 3 deletions
|
|
@ -54,6 +54,12 @@
|
|||
|
||||
#define ASSERT(expr) RASSERT(expr, "?")
|
||||
|
||||
#if ISDEBUG
|
||||
#define UNREACHABLE() { Debug::log(CRIT, "\n\nMEMORY CORRUPTED: Unreachable failed! (Reached an unreachable position, memory corruption!!!)"); *((int*)nullptr) = 1; }
|
||||
#else
|
||||
#define UNREACHABLE() std::unreachable();
|
||||
#endif
|
||||
|
||||
// git stuff
|
||||
#ifndef GIT_COMMIT_HASH
|
||||
#define GIT_COMMIT_HASH "?"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue