From 5ee449efec44a1a1ecbcc7eebdb5d768e1decdcf Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:59:18 +0200 Subject: [PATCH] Remove unnecessary casts button_add_item and button_add are both Button p_parent is a Node3D CanvasItem can never be cast to Viewport --- editor/editor_properties_array_dict.cpp | 6 +++--- editor/plugins/font_config_plugin.cpp | 4 ++-- editor/plugins/node_3d_editor_plugin.cpp | 4 ++-- scene/main/viewport.cpp | 4 ---- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index d98ad117d7d..7cc42f4d240 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -510,7 +510,7 @@ void EditorPropertyArray::_notification(int p_what) { change_type->add_separator(); change_type->add_icon_item(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), TTR("Remove Item"), Variant::VARIANT_MAX); - if (Object::cast_to