From 1bc12ba2b3bc2c4fbe8fad4797cf33266eb13f4b Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 23 Jul 2020 00:34:43 +0100 Subject: Streamline startup sequence * Clean up cRoot & main * Move some OS-specifics into OSSupport --- src/Globals.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Globals.h') 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; #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) -- cgit v1.2.3