1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +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

@ -53,7 +53,7 @@ PropertiesWindow::PropertiesWindow(DeprecatedString const& path, Window* parent_
ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename)
{
auto main_widget = TRY(set_main_widget<GUI::Widget>());
(void)TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(4, 6));
TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(4, 6));
main_widget->set_fill_with_background_color(true);
auto tab_widget = TRY(main_widget->try_add<GUI::TabWidget>());
@ -149,7 +149,7 @@ ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename)
TRY(setup_permission_checkboxes(*others_read, *others_write, *others_execute, { S_IROTH, S_IWOTH, S_IXOTH }, m_mode));
auto button_widget = TRY(main_widget->try_add<GUI::Widget>());
(void)TRY(button_widget->try_set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 5));
TRY(button_widget->try_set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 5));
button_widget->set_fixed_height(22);
TRY(button_widget->add_spacer());