diff --git a/rpcs3/util/fixed_typemap.hpp b/rpcs3/util/fixed_typemap.hpp index 5d782ea39f..d1bcd3d5d0 100644 --- a/rpcs3/util/fixed_typemap.hpp +++ b/rpcs3/util/fixed_typemap.hpp @@ -94,7 +94,7 @@ namespace stx // Explicitly (re)initialize object of type T possibly with dynamic type As and arguments template - T* init(Args&&... args) noexcept + As* init(Args&&... args) noexcept { auto& ptr = m_list[stx::type_counter::template type>.index()]; @@ -103,8 +103,8 @@ namespace stx delete static_cast(ptr); } - auto* obj = static_cast(new std::decay_t(std::forward(args)...)); - ptr = obj; + As* obj = new std::decay_t(std::forward(args)...); + ptr = static_cast(obj); return obj; }