diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.h b/rpcs3/Emu/ARMv7/PSVFuncList.h index 12e6d50648..7c8d3680ef 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.h +++ b/rpcs3/Emu/ARMv7/PSVFuncList.h @@ -352,10 +352,10 @@ namespace psv_func_detail return put_func_args(context, args...) || (t == ARG_STACK); } - template + template struct func_binder; - template + template struct func_binder { typedef void(*func_t)(T...); @@ -366,7 +366,7 @@ namespace psv_func_detail } }; - template + template struct func_binder { typedef void(*func_t)(ARMv7Context&, T...); @@ -377,7 +377,7 @@ namespace psv_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(T...); @@ -388,7 +388,7 @@ namespace psv_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(ARMv7Context&, T...); @@ -448,7 +448,7 @@ enum psv_special_function_index : u16 // Do not call directly u32 add_psv_func(psv_func data); // Do not call directly -template void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*_func)(T...)) +template void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*_func)(T...)) { psv_func f; f.nid = nid; @@ -459,7 +459,7 @@ template void reg_psv_func(u32 nid, p add_psv_func(f); } -typedef void(*func_ptr)(); +typedef void(func_ptr)(); // Find registered HLE function by NID psv_func* get_psv_func_by_nid(u32 nid, u32* out_index = nullptr); diff --git a/rpcs3/Emu/SysCalls/Modules.h b/rpcs3/Emu/SysCalls/Modules.h index d7a859f7a5..1bd14278b1 100644 --- a/rpcs3/Emu/SysCalls/Modules.h +++ b/rpcs3/Emu/SysCalls/Modules.h @@ -111,9 +111,9 @@ public: bool RemoveId(u32 id); - template __forceinline u32 AddFunc(const u32 nid, T _func); - template __forceinline u32 AddFunc(const char* name, T _func); - template __forceinline u32 AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func); + template __forceinline u32 AddFunc(const u32 nid, T _func); + template __forceinline u32 AddFunc(const char* name, T _func); + template __forceinline u32 AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func); }; u32 add_ps3_func(ModuleFunc func); @@ -123,19 +123,19 @@ void execute_ps3_func_by_index(PPUThread& CPU, u32 id); void clear_ps3_functions(); u32 get_function_id(const char* name); -template +template __forceinline u32 Module::AddFunc(const u32 nid, T _func) { return add_ps3_func(ModuleFunc(nid, this, ppu_func_detail::_bind_func(_func))); } -template +template __forceinline u32 Module::AddFunc(const char* name, T _func) { return AddFunc(get_function_id(name), _func); } -template +template __forceinline u32 Module::AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func) { SFunc* sf = new SFunc; @@ -163,8 +163,8 @@ __forceinline u32 Module::AddFuncSub(const char group[8], const u64 ops[], const #define REG_SUB(module, group, name, ...) \ static const u64 name ## _table[] = {__VA_ARGS__ , 0}; \ - if (name ## _table[0]) module.AddFuncSub<(void(*)())name>(group, name ## _table, #name, name) + if (name ## _table[0]) module.AddFuncSub<(void())name>(group, name ## _table, #name, name) -#define REG_FUNC(module, name) module.AddFunc<(void(*)())name>(#name, name) +#define REG_FUNC(module, name) module.AddFunc<(void())name>(#name, name) #define UNIMPLEMENTED_FUNC(module) module.Error("%s", __FUNCTION__) diff --git a/rpcs3/Emu/SysCalls/SC_FUNC.h b/rpcs3/Emu/SysCalls/SC_FUNC.h index 7e55a17b6b..dfe0e4d783 100644 --- a/rpcs3/Emu/SysCalls/SC_FUNC.h +++ b/rpcs3/Emu/SysCalls/SC_FUNC.h @@ -156,10 +156,10 @@ namespace ppu_func_detail static const bind_arg_type value = is_float ? ARG_FLOAT : (is_vector ? ARG_VECTOR : ARG_GENERAL); }; - template + template struct func_binder; - template + template struct func_binder { typedef void(*func_t)(T...); @@ -170,7 +170,7 @@ namespace ppu_func_detail } }; - template + template struct func_binder { typedef void(*func_t)(PPUThread&, T...); @@ -181,7 +181,7 @@ namespace ppu_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(T...); @@ -192,7 +192,7 @@ namespace ppu_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(PPUThread&, T...); @@ -205,11 +205,11 @@ namespace ppu_func_detail using bound_func_t = void(*)(PPUThread&); - template + template bound_func_t _bind_func(RT(*_func)(T...)) { return ppu_func_detail::func_binder::do_call; } } -#define bind_func(func) (ppu_func_detail::_bind_func<(void(*)())func>(func)) +#define bind_func(func) (ppu_func_detail::_bind_func<(void())func>(func))