aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuzubot <yuzu@yuzu-emu.org>2020-10-09 12:01:17 +0000
committeryuzubot <yuzu@yuzu-emu.org>2020-10-09 12:01:17 +0000
commite4fee37adb00a568e5bdf99a2e47e484e805b23e (patch)
treeddee5afd971fc10ea50a724013129e9eedeb2493
parent61b246a3a952e704549f3d3a191fcb7442420fb1 (diff)
"Merge Tagged PR 1340"mainline-0-403
-rw-r--r--src/common/assert.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/common/assert.h b/src/common/assert.h
index 06d7b5612b..48c09b530b 100644
--- a/src/common/assert.h
+++ b/src/common/assert.h
@@ -29,22 +29,19 @@ assert_noinline_call(const Fn& fn) {
}
#define ASSERT(_a_) \
- do \
- if (!(_a_)) { \
- assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
- } \
- while (0)
+ if (!(_a_)) { \
+ LOG_CRITICAL(Debug, "Assertion Failed!"); \
+ }
#define ASSERT_MSG(_a_, ...) \
- do \
- if (!(_a_)) { \
- assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
- } \
- while (0)
+ if (!(_a_)) { \
+ LOG_CRITICAL(Debug, "Assertion Failed! " __VA_ARGS__); \
+ }
-#define UNREACHABLE() assert_noinline_call([] { LOG_CRITICAL(Debug, "Unreachable code!"); })
+#define UNREACHABLE() \
+ { LOG_CRITICAL(Debug, "Unreachable code!"); }
#define UNREACHABLE_MSG(...) \
- assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); })
+ { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); }
#ifdef _DEBUG
#define DEBUG_ASSERT(_a_) ASSERT(_a_)