diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-23 01:34:43 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-05 14:16:52 +0200 |
commit | 1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b (patch) | |
tree | ea7f02576728ac4143707b0af3829ae843bde041 /src/Globals.h | |
parent | Rename AddEntityIfNotPresent to AddPlayer (diff) | |
download | cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.tar cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.tar.gz cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.tar.bz2 cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.tar.lz cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.tar.xz cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.tar.zst cuberite-1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b.zip |
Diffstat (limited to 'src/Globals.h')
-rw-r--r-- | src/Globals.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Globals.h b/src/Globals.h index c2f117e23..7fc9addf6 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -280,23 +280,23 @@ template class SizeChecker<UInt8, 1>; #endif // Pretty much the same as ASSERT() but stays in Release builds - #define VERIFY(x) (!!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), exit(1), 0)) + #define VERIFY(x) (!!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) #else // TEST_GLOBALS #ifdef _DEBUG - #define ASSERT(x) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__), PrintStackTrace(), assert(0), 0)) + #define ASSERT(x) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) #else #define ASSERT(x) #endif // Pretty much the same as ASSERT() but stays in Release builds - #define VERIFY(x) (!!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), PrintStackTrace(), exit(1), 0)) + #define VERIFY(x) (!!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) #endif // else TEST_GLOBALS /** Use to mark code that should be impossible to reach. */ -#define UNREACHABLE(x) do { FLOGERROR("Hit unreachable code: {0}, file {1}, line {2}", #x, __FILE__, __LINE__); PrintStackTrace(); std::terminate(); } while (false) +#define UNREACHABLE(x) do { FLOGERROR("Hit unreachable code: {0}, file {1}, line {2}", #x, __FILE__, __LINE__); std::abort(); } while (false) |