diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-06-08 19:36:27 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-08 19:14:24 +0200 |
commit | 7ac196974de3a85430f4ccd1db883943853d8ae0 (patch) | |
tree | efc838bfc282a16379e1c80b7f3e721a6eb8b297 /Userland/Applications/KeyboardMapper | |
parent | 3d94b5051d8a783858cde04eb4d2e1ecf63ac180 (diff) | |
download | serenity-7ac196974de3a85430f4ccd1db883943853d8ae0.zip |
Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&>
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(); |