diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-10-24 15:59:18 +0200 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-10-24 15:59:18 +0200 |
commit | 5ee449efec44a1a1ecbcc7eebdb5d768e1decdcf (patch) | |
tree | 154dfe0b024b1050175c4bb9bab6f109f1fef17a /editor/editor_properties_array_dict.cpp | |
parent | 040f49ed6e71a6e7f23d763c4b56095cbf319ef7 (diff) | |
download | redot-engine-5ee449efec44a1a1ecbcc7eebdb5d768e1decdcf.tar.gz |
Remove unnecessary casts
button_add_item and button_add are both Button
p_parent is a Node3D
CanvasItem can never be cast to Viewport
Diffstat (limited to 'editor/editor_properties_array_dict.cpp')
-rw-r--r-- | editor/editor_properties_array_dict.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index d98ad117d7..7cc42f4d24 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<Button>(button_add_item)) { + if (button_add_item) { button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); } } break; @@ -1205,7 +1205,7 @@ void EditorPropertyDictionary::_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<Button>(button_add_item)) { + if (button_add_item) { button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); } } break; @@ -1431,7 +1431,7 @@ void EditorPropertyLocalizableString::_notification(int p_what) { switch (p_what) { case NOTIFICATION_THEME_CHANGED: case NOTIFICATION_ENTER_TREE: { - if (Object::cast_to<Button>(button_add_item)) { + if (button_add_item) { button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); } } break; |