diff options
| author | David Snopek <dsnopek@gmail.com> | 2023-02-16 06:58:32 -0600 |
|---|---|---|
| committer | David Snopek <dsnopek@gmail.com> | 2023-02-16 06:58:32 -0600 |
| commit | 964c515d75459f11ffb9a5fec8e70ad8f9d4112d (patch) | |
| tree | 7b01ddaf15e52736063c7b786135246fec37641b /include/godot_cpp/core | |
| parent | f5133c08a529d027e3232d593b0f6c3ca45a0545 (diff) | |
| download | redot-cpp-964c515d75459f11ffb9a5fec8e70ad8f9d4112d.tar.gz | |
Revert "Fix Object::cast_to<T>() for custom classes"
This reverts commit 75af9003dc2b1583966ab91be6ce1687378860ae.
Diffstat (limited to 'include/godot_cpp/core')
| -rw-r--r-- | include/godot_cpp/core/object.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp index a2fa96e..f5c790a 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -142,7 +142,7 @@ T *Object::cast_to(Object *p_object) { if (casted == nullptr) { return nullptr; } - return dynamic_cast<T *>((Object *)internal::gde_interface->object_get_instance_binding(casted, internal::token, &T::___binding_callbacks)); + return reinterpret_cast<T *>(internal::gde_interface->object_get_instance_binding(casted, internal::token, &T::___binding_callbacks)); } template <class T> @@ -155,7 +155,7 @@ const T *Object::cast_to(const Object *p_object) { if (casted == nullptr) { return nullptr; } - return dynamic_cast<const T *>((Object *)internal::gde_interface->object_get_instance_binding(casted, internal::token, &T::___binding_callbacks)); + return reinterpret_cast<const T *>(internal::gde_interface->object_get_instance_binding(casted, internal::token, &T::___binding_callbacks)); } } // namespace godot |
