diff --git a/core/reference.h b/core/reference.h index 60a256dc997..89e9627b77c 100644 --- a/core/reference.h +++ b/core/reference.h @@ -341,7 +341,7 @@ struct PtrToArg< Ref > { _FORCE_INLINE_ static void encode(Ref p_val,const void* p_ptr) { - *((T**)p_ptr)=p_val.ptr(); + *(Ref*)p_ptr=p_val; } }; @@ -371,7 +371,7 @@ struct PtrToArg< RefPtr > { _FORCE_INLINE_ static void encode(RefPtr p_val,const void* p_ptr) { Ref r = p_val; - *((Reference**)p_ptr)=r.ptr(); + *(Ref*)p_ptr=r; } };