summaryrefslogtreecommitdiffstats
path: root/src/variant
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-02-17 10:49:09 -0600
committerDavid Snopek <dsnopek@gmail.com>2023-05-16 15:18:48 -0500
commit431e30bc3273c83315725f56365845f0b89c0524 (patch)
treee0fa53d1327a6816665513568676110444ef30b4 /src/variant
parent1c18413de00f1a6265b2b6c30175b2f6a434b574 (diff)
downloadredot-cpp-431e30bc3273c83315725f56365845f0b89c0524.tar.gz
Ensure GDExtension class is the correct type for the Godot engine class
Diffstat (limited to 'src/variant')
-rw-r--r--src/variant/variant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/variant/variant.cpp b/src/variant/variant.cpp
index 6c1e964..a73db74 100644
--- a/src/variant/variant.cpp
+++ b/src/variant/variant.cpp
@@ -33,6 +33,7 @@
#include <godot_cpp/godot.hpp>
#include <godot_cpp/core/binder_common.hpp>
+#include <godot_cpp/core/class_db.hpp>
#include <godot_cpp/core/defs.hpp>
#include <utility>
@@ -411,7 +412,7 @@ Variant::operator Object *() const {
if (obj == nullptr) {
return nullptr;
}
- return reinterpret_cast<Object *>(internal::gdextension_interface_object_get_instance_binding(obj, internal::token, &Object::___binding_callbacks));
+ return internal::get_object_instance_binding(obj);
}
Variant::operator ObjectID() const {