Compilation fix 2 + callback fix

This commit is contained in:
Nekotekina 2014-09-01 21:38:55 +04:00
parent 3b764d45f2
commit 09022b1000
2 changed files with 19 additions and 5 deletions

View File

@ -197,13 +197,13 @@ class to_be_t
template<typename TT, typename TT2, bool is_need_swap>
struct _be_type_selector
{
typedef typename TT type;
typedef TT type;
};
template<typename TT, typename TT2>
struct _be_type_selector<TT, TT2, true>
{
typedef typename be_t<TT, TT2> type;
typedef be_t<TT, TT2> type;
};
public:

View File

@ -312,6 +312,11 @@ namespace vm
}
};
namespace ps3
{
template<typename T, int lvl, typename AT> class ptr;
}
template<typename AT, typename RT, typename ...T>
class _ptr_base<RT(*)(T...), 1, AT>
{
@ -329,7 +334,16 @@ namespace vm
template<typename TT, typename ATT>
struct _func_arg<_ptr_base<TT, 1, ATT>>
{
__forceinline static u64 get_value(const _ptr_base<TT, 1, ATT> arg)
__forceinline static u64 get_value(const _ptr_base<TT, 1, ATT>& arg)
{
return arg.addr();
}
};
template<typename TT, typename ATT>
struct _func_arg<ps3::ptr<TT, 1, ATT>>
{
__forceinline static u64 get_value(const ps3::ptr<TT, 1, ATT>& arg)
{
return arg.addr();
}
@ -338,7 +352,7 @@ namespace vm
template<typename TT, typename ATT>
struct _func_arg<_ref_base<TT, ATT>>
{
__forceinline static u64 get_value(const _ref_base<TT, ATT> arg)
__forceinline static u64 get_value(const _ref_base<TT, ATT>& 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<TT, i, ATT> arg)
__forceinline static u64 get_value(const mem_ptr_t<TT, i, ATT>& arg)
{
return 0;
}