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/Libraries/LibGUI/Splitter.cpp | |
parent | 3d94b5051d8a783858cde04eb4d2e1ecf63ac180 (diff) | |
download | serenity-7ac196974de3a85430f4ccd1db883943853d8ae0.zip |
Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&>
Diffstat (limited to 'Userland/Libraries/LibGUI/Splitter.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Splitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGUI/Splitter.cpp b/Userland/Libraries/LibGUI/Splitter.cpp index b19712096b..c0d2110278 100644 --- a/Userland/Libraries/LibGUI/Splitter.cpp +++ b/Userland/Libraries/LibGUI/Splitter.cpp @@ -155,7 +155,7 @@ void Splitter::recompute_grabbables() m_hovered_index = {}; auto child_widgets = this->child_widgets(); - child_widgets.remove_all_matching([&](auto& widget) { return !widget->is_visible(); }); + child_widgets.remove_all_matching([&](auto& widget) { return !widget.is_visible(); }); if (child_widgets.size() < 2) return; @@ -164,8 +164,8 @@ void Splitter::recompute_grabbables() size_t end_index = 1; while (end_index < child_widgets.size()) { - auto const& first_widget = *child_widgets[start_index]; - auto const& second_widget = *child_widgets[end_index]; + auto const& first_widget = child_widgets[start_index]; + auto const& second_widget = child_widgets[end_index]; m_grabbables.append(Grabbable { .index = m_grabbables.size(), .grabbable_rect = rect_between_widgets(first_widget, second_widget, true), |