summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp
diff options
context:
space:
mode:
authorEmmanuel Leblond <emmanuel.leblond@gmail.com>2022-12-05 03:30:50 +0100
committerEmmanuel Leblond <emmanuel.leblond@gmail.com>2022-12-05 03:30:50 +0100
commitfe79449969a14dd19c9e148405f73a8a428d26a8 (patch)
treebd22687d8a266511c65e118d7b65873399bd1f58 /include/godot_cpp
parent32859ea25c31ae596535d6bf0178a6e01f45a001 (diff)
downloadredot-cpp-fe79449969a14dd19c9e148405f73a8a428d26a8.tar.gz
Fix cast on PtrToArg::convert
Diffstat (limited to 'include/godot_cpp')
-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 d22b712..5e17ea5 100644
--- a/include/godot_cpp/core/method_ptrcall.hpp
+++ b/include/godot_cpp/core/method_ptrcall.hpp
@@ -168,7 +168,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::gdn_interface->object_get_instance_binding(*reinterpret_cast<GDNativeConstObjectPtr *>(const_cast<void *>(p_ptr)), godot::internal::token, &T::___binding_callbacks));
+ return reinterpret_cast<T *>(godot::internal::gdn_interface->object_get_instance_binding(*reinterpret_cast<GDNativeObjectPtr *>(const_cast<void *>(p_ptr)), godot::internal::token, &T::___binding_callbacks));
}
typedef Object *EncodeT;
_FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) {
@@ -179,7 +179,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::gdn_interface->object_get_instance_binding(*reinterpret_cast<GDNativeConstObjectPtr *>(const_cast<void *>(p_ptr)), godot::internal::token, &T::___binding_callbacks));
+ return reinterpret_cast<const T *>(godot::internal::gdn_interface->object_get_instance_binding(*reinterpret_cast<GDNativeObjectPtr *>(const_cast<void *>(p_ptr)), godot::internal::token, &T::___binding_callbacks));
}
typedef const Object *EncodeT;
_FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) {