mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-06 09:07:19 +02:00
[dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) (#2890)
- replace instances of ASSERT() with those where UNREACHABLE() should be used instead
- debuggers exist for a reason, you can't just debug an issue in dynarmic with just printing fancy text... you need to inspect values and alldat - while yes the asserts are "useful"; there is this beautiful thing called backtraces
- this will indirectly speedup the main decoder loop because of the added UNREACHABLE()
- this also removes a bunch of macros that were redundant
- the weird trick of [&](){}() is really funky, just do what everyone has done for the past 30 years and use a `do { <thing> } while(0)` :)
I may or may not have missed one assert or messed up my regex substitutions...
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2890
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
2dc6d773ee
commit
f9773fa908
65 changed files with 385 additions and 429 deletions
|
|
@ -18,7 +18,7 @@
|
|||
#define CHECKED(expr) \
|
||||
do { \
|
||||
if (auto cerr_ = (expr)) { \
|
||||
ASSERT_MSG(false, "Call " #expr " failed with error: {} ({})\n", static_cast<size_t>(cerr_), \
|
||||
ASSERT(false && "Call " #expr " failed with error: {} ({})\n", static_cast<size_t>(cerr_), \
|
||||
uc_strerror(cerr_)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#define CHECKED(expr) \
|
||||
do { \
|
||||
if (auto cerr_ = (expr)) { \
|
||||
ASSERT_MSG(false, "Call " #expr " failed with error: {} ({})\n", static_cast<size_t>(cerr_), \
|
||||
ASSERT(false && "Call " #expr " failed with error: {} ({})\n", static_cast<size_t>(cerr_), \
|
||||
uc_strerror(cerr_)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue