diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp index 138274b15..5ee2a5935 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -128,9 +128,9 @@ T *Object::cast_to(Object *p_object) { template const T *Object::cast_to(const Object *p_object) { #if GODOT_VERSION_MINOR >= 7 - return p_object && p_object->is_class(T::get_class_static()) ? static_cast(p_object) : nullptr; + return p_object && p_object->is_class(T::get_class_static()) ? static_cast(p_object) : nullptr; #else - return p_object ? dynamic_cast(p_object) : nullptr; + return p_object ? dynamic_cast(p_object) : nullptr; #endif }