1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:48:12 +00:00

LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()

Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
This commit is contained in:
Sam Atkins 2023-02-16 21:17:12 +00:00 committed by Sam Atkins
parent 77ad0fdb07
commit 6b66e39df4
20 changed files with 47 additions and 48 deletions

View file

@ -175,10 +175,10 @@ static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
main_widget->set_fill_with_background_color(true);
main_widget->set_background_role(ColorRole::Button);
(void)TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(4));
TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(4));
auto find = TRY(main_widget->try_add<GUI::Widget>());
(void)TRY(find->try_set_layout<GUI::HorizontalBoxLayout>(4));
TRY(find->try_set_layout<GUI::HorizontalBoxLayout>(4));
find->set_fixed_height(30);
auto find_textbox = TRY(find->try_add<GUI::TextBox>());