diff options
author | yuzubot <yuzu@yuzu-emu.org> | 2021-03-07 21:50:48 +0000 |
---|---|---|
committer | yuzubot <yuzu@yuzu-emu.org> | 2021-03-07 21:50:48 +0000 |
commit | 1766dd1c1d88842246a6a722deeba4dbe1090f66 (patch) | |
tree | 88dfc5e3a9952a5d59a50af02c6c4ef24a3970b1 /src | |
parent | edd67ceace473cb2d8f055c54181359c99bbc41f (diff) |
"Merge Tagged PR 1340"mainline-0-556
Diffstat (limited to 'src')
-rw-r--r-- | src/common/assert.h | 21 |
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_) |