diff options
| author | David Snopek <dsnopek@gmail.com> | 2023-05-23 15:17:06 -0500 |
|---|---|---|
| committer | David Snopek <dsnopek@gmail.com> | 2023-06-07 08:30:33 -0500 |
| commit | ad726015e7bb5aaaf6d8f3b98fca2b21bf15c830 (patch) | |
| tree | a0c4580f96da160e27bfd694f2dee8614927db87 /include/godot_cpp/core | |
| parent | c669f0b78a1a046dd2f7c2589b27abd28ab13101 (diff) | |
| download | redot-cpp-ad726015e7bb5aaaf6d8f3b98fca2b21bf15c830.tar.gz | |
Revert the changes from PR #1044 and #1045 and standardize on `Object **` encoding in ptrcall
Diffstat (limited to 'include/godot_cpp/core')
| -rw-r--r-- | include/godot_cpp/core/method_ptrcall.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/godot_cpp/core/method_ptrcall.hpp b/include/godot_cpp/core/method_ptrcall.hpp index 283f4b0..a85cbc9 100644 --- a/include/godot_cpp/core/method_ptrcall.hpp +++ b/include/godot_cpp/core/method_ptrcall.hpp @@ -169,7 +169,7 @@ MAKE_PTRARG_BY_REFERENCE(Variant); template <class T> struct PtrToArg<T *> { _FORCE_INLINE_ static T *convert(const void *p_ptr) { - return reinterpret_cast<T *>(godot::internal::get_object_instance_binding(reinterpret_cast<GDExtensionObjectPtr>(const_cast<void *>(p_ptr)))); + return reinterpret_cast<T *>(godot::internal::get_object_instance_binding(*reinterpret_cast<GDExtensionObjectPtr *>(const_cast<void *>(p_ptr)))); } typedef Object *EncodeT; _FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) { @@ -180,7 +180,7 @@ struct PtrToArg<T *> { template <class T> struct PtrToArg<const T *> { _FORCE_INLINE_ static const T *convert(const void *p_ptr) { - return reinterpret_cast<const T *>(godot::internal::get_object_instance_binding(reinterpret_cast<GDExtensionObjectPtr>(const_cast<void *>(p_ptr)))); + return reinterpret_cast<const T *>(godot::internal::get_object_instance_binding(*reinterpret_cast<GDExtensionObjectPtr *>(const_cast<void *>(p_ptr)))); } typedef const Object *EncodeT; _FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) { |
