summaryrefslogtreecommitdiff
path: root/Userland/Demos
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-02-16 21:17:12 +0000
committerSam Atkins <atkinssj@gmail.com>2023-02-18 16:56:56 +0000
commit6b66e39df443d4be087cb1b9cb1eeba5341811b0 (patch)
tree117e1d5a7ff29e1451a4b6b97344c6b8c71aaa61 /Userland/Demos
parent77ad0fdb0726aba2ecaf7ea9764a642671d1fd6f (diff)
downloadserenity-6b66e39df443d4be087cb1b9cb1eeba5341811b0.zip
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. :^)
Diffstat (limited to 'Userland/Demos')
-rw-r--r--Userland/Demos/CatDog/main.cpp4
-rw-r--r--Userland/Demos/ModelGallery/GalleryWidget.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp
index 4bd9868c14..76e7796dfd 100644
--- a/Userland/Demos/CatDog/main.cpp
+++ b/Userland/Demos/CatDog/main.cpp
@@ -42,7 +42,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto catdog_widget = TRY(CatDog::create());
window->set_main_widget(catdog_widget);
- (void)TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
+ TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
auto context_menu = TRY(GUI::Menu::try_create());
TRY(context_menu->try_add_action(GUI::CommonActions::make_about_action("CatDog Demo", app_icon, window)));
@@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
advice_window->set_alpha_hit_threshold(1.0f);
auto advice_widget = TRY(advice_window->set_main_widget<SpeechBubble>(catdog_widget));
- (void)TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
+ TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
auto advice_timer = TRY(Core::Timer::create_single_shot(15'000, [&] {
window->move_to_front();
diff --git a/Userland/Demos/ModelGallery/GalleryWidget.cpp b/Userland/Demos/ModelGallery/GalleryWidget.cpp
index 43e8c090e0..9e746b3ddc 100644
--- a/Userland/Demos/ModelGallery/GalleryWidget.cpp
+++ b/Userland/Demos/ModelGallery/GalleryWidget.cpp
@@ -13,7 +13,7 @@ GalleryWidget::GalleryWidget()
set_layout<GUI::VerticalBoxLayout>();
auto& inner_widget = add<GUI::Widget>();
- (void)inner_widget.try_set_layout<GUI::VerticalBoxLayout>(4).release_value_but_fixme_should_propagate_errors();
+ inner_widget.try_set_layout<GUI::VerticalBoxLayout>(4).release_value_but_fixme_should_propagate_errors();
m_tab_widget = inner_widget.try_add<GUI::TabWidget>().release_value_but_fixme_should_propagate_errors();
m_statusbar = add<GUI::Statusbar>();