summaryrefslogtreecommitdiff
path: root/core/method_ptrcall.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/method_ptrcall.h')
-rw-r--r--core/method_ptrcall.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h
index 0f2458d982..118970de80 100644
--- a/core/method_ptrcall.h
+++ b/core/method_ptrcall.h
@@ -32,6 +32,7 @@
#define METHOD_PTRCALL_H
#include "core/math/transform_2d.h"
+#include "core/object_id.h"
#include "core/typedefs.h"
#include "core/variant.h"
@@ -167,6 +168,21 @@ struct PtrToArg<const T *> {
}
};
+//this is for ObjectID
+
+template <>
+struct PtrToArg<ObjectID> {
+ _FORCE_INLINE_ static const ObjectID convert(const void *p_ptr) {
+
+ return ObjectID(*reinterpret_cast<const uint64_t *>(p_ptr));
+ }
+
+ _FORCE_INLINE_ static void encode(const ObjectID &p_val, void *p_ptr) {
+
+ *((uint64_t *)p_ptr) = p_val;
+ }
+};
+
//this is for the special cases used by Variant
#define MAKE_VECARG(m_type) \