diff options
Diffstat (limited to 'Userland/Applications/KeyboardMapper')
-rw-r--r-- | Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 3a06fd5585..49a625cf75 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -136,9 +136,9 @@ void KeyboardMapperWidget::load_from_file(String filename) m_character_map = result.value(); set_current_map("map"); - for (Widget* widget : m_map_group->child_widgets()) { - auto radio_button = (GUI::RadioButton*)widget; - radio_button->set_checked(radio_button->name() == "map"); + for (auto& widget : m_map_group->child_widgets()) { + auto& radio_button = static_cast<GUI::RadioButton&>(widget); + radio_button.set_checked(radio_button.name() == "map"); } update_window_title(); @@ -153,9 +153,9 @@ void KeyboardMapperWidget::load_from_system() m_character_map = result.value().character_map_data(); set_current_map("map"); - for (Widget* widget : m_map_group->child_widgets()) { - auto radio_button = (GUI::RadioButton*)widget; - radio_button->set_checked(radio_button->name() == "map"); + for (auto& widget : m_map_group->child_widgets()) { + auto& radio_button = static_cast<GUI::RadioButton&>(widget); + radio_button.set_checked(radio_button.name() == "map"); } update_window_title(); |