summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-05-23 15:17:06 -0500
committerDavid Snopek <dsnopek@gmail.com>2023-06-07 08:30:33 -0500
commitad726015e7bb5aaaf6d8f3b98fca2b21bf15c830 (patch)
treea0c4580f96da160e27bfd694f2dee8614927db87 /include/godot_cpp/core
parentc669f0b78a1a046dd2f7c2589b27abd28ab13101 (diff)
downloadredot-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.hpp4
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) {