From 09022b1000dd8b399cdd6d8de33417fd505ddd62 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 1 Sep 2014 21:38:55 +0400 Subject: [PATCH] Compilation fix 2 + callback fix --- Utilities/BEType.h | 4 ++-- rpcs3/Emu/Memory/vm_ptr.h | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Utilities/BEType.h b/Utilities/BEType.h index f8375351b8..d2dc61b663 100644 --- a/Utilities/BEType.h +++ b/Utilities/BEType.h @@ -197,13 +197,13 @@ class to_be_t template struct _be_type_selector { - typedef typename TT type; + typedef TT type; }; template struct _be_type_selector { - typedef typename be_t type; + typedef be_t type; }; public: diff --git a/rpcs3/Emu/Memory/vm_ptr.h b/rpcs3/Emu/Memory/vm_ptr.h index 50a2cc9780..c7dd6d2c0e 100644 --- a/rpcs3/Emu/Memory/vm_ptr.h +++ b/rpcs3/Emu/Memory/vm_ptr.h @@ -312,6 +312,11 @@ namespace vm } }; + namespace ps3 + { + template class ptr; + } + template class _ptr_base { @@ -329,7 +334,16 @@ namespace vm template struct _func_arg<_ptr_base> { - __forceinline static u64 get_value(const _ptr_base arg) + __forceinline static u64 get_value(const _ptr_base& arg) + { + return arg.addr(); + } + }; + + template + struct _func_arg> + { + __forceinline static u64 get_value(const ps3::ptr& arg) { return arg.addr(); } @@ -338,7 +352,7 @@ namespace vm template struct _func_arg<_ref_base> { - __forceinline static u64 get_value(const _ref_base arg) + __forceinline static u64 get_value(const _ref_base& arg) { return arg.addr(); } @@ -349,7 +363,7 @@ namespace vm { static_assert(!i, "Invalid callback argument type (mem_ptr_t), use vm::ptr"); - __forceinline static u64 get_value(const mem_ptr_t arg) + __forceinline static u64 get_value(const mem_ptr_t& arg) { return 0; }