From 8b29997ed188bbf62ac568cf21dfed39a84c1f88 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 25 Mar 2018 21:36:37 -0400 Subject: [PATCH] Interpreter: Remove an unnecessary UReg_MSR& cast from SingleStepInner This is technically undefined behavior, but regardless of that, it's not even necessary since we can just make a temporary around the MSR value and just discard it when done with it, since all we do is query the FP bit value with it. --- Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 9d0014cc1a..fd900defe1 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -152,7 +152,7 @@ int Interpreter::SingleStepInner() if (m_prev_inst.hex != 0) { - UReg_MSR& msr = (UReg_MSR&)MSR; + const UReg_MSR msr{MSR}; if (msr.FP) // If FPU is enabled, just execute { m_op_table[m_prev_inst.OPCD](m_prev_inst);