mirror of
https://github.com/zeldaret/tp
synced 2026-07-09 06:53:23 -04:00
fix/simplify assert macros (#1929)
This commit is contained in:
@@ -4,18 +4,18 @@
|
||||
#include "dolphin/types.h"
|
||||
|
||||
#if DEBUG
|
||||
#define JUT_ASSERT(FILE, LINE, COND) \
|
||||
if (!COND) { \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), FILE, LINE, #COND); \
|
||||
OSPanic(FILE, LINE, "Halt"); \
|
||||
#define JUT_ASSERT(LINE, COND) \
|
||||
if ((COND) == 0) { \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND); \
|
||||
OSPanic(__FILE__, LINE, "Halt"); \
|
||||
}
|
||||
|
||||
#define JUT_PANIC(FILE, LINE, TEXT) \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), FILE, LINE, TEXT); \
|
||||
OSPanic(FILE, LINE, "Halt");
|
||||
#define JUT_PANIC(LINE, TEXT) \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, TEXT); \
|
||||
OSPanic(__FILE__, LINE, "Halt");
|
||||
|
||||
#define JUT_WARN(FILE, LINE, ...) \
|
||||
JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), FILE, LINE, __VA_ARGS__)
|
||||
#define JUT_WARN(LINE, ...) \
|
||||
JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__); \
|
||||
|
||||
#define JUT_LOG(LINE, ...) \
|
||||
JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__)
|
||||
|
||||
Reference in New Issue
Block a user