mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 12:00:43 +02:00
LogManager: Unconditionally evaluate assertion conditions
A prevalent pattern in the FEX codebase is to compute some data and store it in a maybe_unused variable that's only ever passed to LOGMAN_THROW_A_FMT. Besides few exceptions, we never compute expensive data in the macro arguments themselves, so we can remove a lot of code noise by unconditionally evaluating the condition even in assertion-disabled builds.
This commit is contained in:
1 parent
a156752fae
commit
51e64c69f3
22 files changed
+78
-68
No files matched your search
@@ -3934,7 +3934,7 @@ void OpDispatchBuilder::Finalize() {
|
||||
// Node 0 is invalid node
|
||||
Ref RealNode = reinterpret_cast<Ref>(GetNode(1));
|
||||
|
||||
[[maybe_unused]] const FEXCore::IR::IROp_Header* IROp = RealNode->Op(DualListData.DataBegin());
|
||||
const FEXCore::IR::IROp_Header* IROp = RealNode->Op(DualListData.DataBegin());
|
||||
LOGMAN_THROW_A_FMT(IROp->Op == OP_IRHEADER, "First op in function must be our header");
|
||||
|
||||
// Let's walk the jump blocks and see if we have handled every block target
|
||||
|
||||
Reference in new issue
Block a user