mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-21 14:07:29 -04:00
Fix JUT_ASSERT to use double defines
We know JUT_ASSERT originally had double defines because defines such as NULL and ARRAY_SIZE are expanded in assertion strings, as discovered by Jasper: https://godbolt.org/z/PvqsG9asb
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
#include "dolphin/types.h"
|
||||
#include "dolphin/os/OS.h"
|
||||
|
||||
#define JUT_ASSERT(LINE, COND) (void)((COND) || (JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND), OSPanic(__FILE__, LINE, "Halt"), 0));
|
||||
#define JUT_SHOW_ASSERT(LINE, COND) JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND)
|
||||
|
||||
#define JUT_ASSERT(LINE, COND) (void)((COND) || (JUT_SHOW_ASSERT(LINE, COND), OSPanic(__FILE__, LINE, "Halt"), 0));
|
||||
|
||||
// Favored by JAI (JAudio)
|
||||
#define JUT_ASSERT_MSG(LINE, COND, MSG) \
|
||||
|
||||
Reference in New Issue
Block a user