summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-09-22 02:46:29 +0200
committerBastiaan Olij <mux213@gmail.com>2021-09-27 23:08:11 +1000
commitcc88df05e7b58d64f65dd2137dc79324a3379b61 (patch)
tree41f620b442a405d9682f62052799482553625745 /include/godot_cpp
parent2b1100c87831e8af5f64fba7f7b4d25ab6da4f70 (diff)
downloadredot-cpp-cc88df05e7b58d64f65dd2137dc79324a3379b61.tar.gz
Fix PtrToArg encoding for `Object *`.
It didn't set the return value at all, changing the local value instead. Now instead correctly sets it as a generic pointer type from `_owner`.
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 b0b9874..5aae0f3 100644
--- a/include/godot_cpp/core/method_ptrcall.hpp
+++ b/include/godot_cpp/core/method_ptrcall.hpp
@@ -169,7 +169,7 @@ struct PtrToArg<T *> {
}
typedef Object *EncodeT;
_FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) {
- p_ptr = p_var->_owner;
+ *((void **)p_ptr) = p_var->_owner;
}
};
@@ -180,7 +180,7 @@ struct PtrToArg<const T *> {
}
typedef const Object *EncodeT;
_FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) {
- p_ptr = p_var->_owner;
+ *((void **)p_ptr) = p_var->_owner;
}
};