diff options
author | David Snopek <dsnopek@gmail.com> | 2023-05-24 21:17:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 21:17:12 -0500 |
commit | 8052f818b47c163d3e0a19b13282d909ebfa55f2 (patch) | |
tree | 52ec76b9da866251232b46599710a64d54a81dd9 /src/variant/variant.cpp | |
parent | 08bc2ef680cd8b536519d7f59c6f760e96a3d0a8 (diff) | |
parent | 431e30bc3273c83315725f56365845f0b89c0524 (diff) | |
download | redot-cpp-8052f818b47c163d3e0a19b13282d909ebfa55f2.tar.gz |
Merge pull request #1050 from dsnopek/object-correct-class
Ensure GDExtension class is the correct type for the Godot engine class
Diffstat (limited to 'src/variant/variant.cpp')
-rw-r--r-- | src/variant/variant.cpp | 3 |
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 { |