From acdb89c898c80f56121dc60efe664ae4b1bf15c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 21 Nov 2017 21:00:59 +0100 Subject: [PATCH] Make our release mode asserts actually fire properly in release mode again... --- Common/Log.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Common/Log.h b/Common/Log.h index 2272b8fb38..bd74c348b5 100644 --- a/Common/Log.h +++ b/Common/Log.h @@ -20,6 +20,7 @@ #include #include +#include "CommonFuncs.h" #include "Common/MsgHandler.h" #if defined(__ANDROID__) @@ -123,7 +124,7 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char * if (!(_a_)) {\ ERROR_LOG(_t_, "Error...\n\n Line: %d\n File: %s\n\nIgnore and continue?", \ __LINE__, __FILE__); \ - if (!PanicYesNo("*** Assertion ***\n")) { assert(false); } \ + if (!PanicYesNo("*** Assertion ***\n")) { Crash(); } \ } #if defined(__ANDROID__) @@ -141,7 +142,7 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char * if (!(_a_)) {\ printf(__VA_ARGS__); \ ERROR_LOG(_t_, __VA_ARGS__); \ - if (!PanicYesNo(__VA_ARGS__)) { assert(false);} \ + if (!PanicYesNo(__VA_ARGS__)) { Crash();} \ } #endif // __ANDROID__ @@ -161,7 +162,7 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char * if (!(_a_)) {\ ERROR_LOG(SYSTEM, "Error...\n\n Line: %d\n File: %s\n\nIgnore and continue?", \ __LINE__, __FILE__); \ - if (!PanicYesNo("*** Assertion ***\n")) { assert(false); } \ + if (!PanicYesNo("*** Assertion ***\n")) { Crash(); } \ } #if defined(__ANDROID__) @@ -175,7 +176,7 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char * #define _assert_msg_(_t_, _a_, ...) \ if (!(_a_) && !PanicYesNo(__VA_ARGS__)) { \ - assert(false); \ + Crash(); \ } #endif // __ANDROID__ \ No newline at end of file