From d2d0ef18035f3b04bf768e1bbdc70e05a05e95a5 Mon Sep 17 00:00:00 2001 From: LC Date: Wed, 15 Jul 2026 07:03:07 -0400 Subject: [PATCH] RFCE: Remove unnecessary std::invoke() We can just call this normally (and also make the constituent helper function internally linked). --- .../IR/Passes/RedundantFlagCalculationElimination.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp b/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp index 054460254..9082b49fc 100644 --- a/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp +++ b/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp @@ -196,7 +196,7 @@ unsigned DeadFlagCalculationEliminination::FlagsForCondClassType(CondClass Cond) } } -constexpr FlagInfo ClassifyConst(IROps Op) { +static constexpr FlagInfo ClassifyConst(IROps Op) { switch (Op) { case OP_ANDWITHFLAGS: return FlagInfo::Pack({ @@ -332,15 +332,15 @@ constexpr FlagInfo ClassifyConst(IROps Op) { } } -constexpr auto FlagInfos = std::invoke([] { +constexpr auto FlagInfos = [] { std::array ret = {}; for (unsigned i = 0; i < OP_LAST; ++i) { - ret[i] = ClassifyConst((IROps)i); + ret[i] = ClassifyConst(IROps(i)); } return ret; -}); +}(); FlagInfo DeadFlagCalculationEliminination::Classify(IROp_Header* IROp) { FlagInfo Info = FlagInfos[IROp->Op];