From 14b204a9bb5b9afd7a6afd331b53f15bcc17688d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 19 Mar 2018 03:12:45 -0400 Subject: [PATCH] JitInterface: Remove a downcast within InitJitCore This isn't necessary as JitBase is already within the type hierarchy that CPUCoreBase is. --- Source/Core/Core/PowerPC/JitInterface.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitInterface.cpp b/Source/Core/Core/PowerPC/JitInterface.cpp index 284b7ea366..2d50fa341e 100644 --- a/Source/Core/Core/PowerPC/JitInterface.cpp +++ b/Source/Core/Core/PowerPC/JitInterface.cpp @@ -46,21 +46,20 @@ void DoState(PointerWrap& p) } CPUCoreBase* InitJitCore(int core) { - CPUCoreBase* ptr = nullptr; switch (core) { #if _M_X86 case PowerPC::CORE_JIT64: - ptr = new Jit64(); + g_jit = new Jit64(); break; #endif #if _M_ARM_64 case PowerPC::CORE_JITARM64: - ptr = new JitArm64(); + g_jit = new JitArm64(); break; #endif case PowerPC::CORE_CACHEDINTERPRETER: - ptr = new CachedInterpreter(); + g_jit = new CachedInterpreter(); break; default: @@ -68,9 +67,8 @@ CPUCoreBase* InitJitCore(int core) g_jit = nullptr; return nullptr; } - g_jit = static_cast(ptr); g_jit->Init(); - return ptr; + return g_jit; } CPUCoreBase* GetCore()