Demos: Cast unused smart-pointer return values to void

This commit is contained in:
Sam Atkins 2021-12-03 09:47:48 +00:00 committed by Andreas Kling
parent 7196570f9b
commit 7e05ccaa70
Notes: sideshowbarker 2024-07-17 23:08:43 +09:00
6 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_icon(app_icon.bitmap_for_size(16));
auto catdog_widget = TRY(window->try_set_main_widget<CatDog>());
TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>());
(void)TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>());
catdog_widget->layout()->set_spacing(0);
auto context_menu = TRY(GUI::Menu::try_create());
@ -59,7 +59,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
advice_window->set_alpha_hit_threshold(1.0f);
auto advice_widget = TRY(advice_window->try_set_main_widget<SpeechBubble>());
TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>());
(void)TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>());
advice_widget->layout()->set_spacing(0);
auto advice_timer = TRY(Core::Timer::try_create());

View File

@ -64,7 +64,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->resize(75 * (full_rows > 0 ? max_in_row : extra_columns), 100 * (full_rows + (extra_columns > 0 ? 1 : 0)));
window->set_has_alpha_channel(true);
TRY(window->try_set_main_widget<EyesWidget>(num_eyes, full_rows, extra_columns));
(void)TRY(window->try_set_main_widget<EyesWidget>(num_eyes, full_rows, extra_columns));
auto file_menu = TRY(window->try_add_menu("&File"));
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));

View File

@ -203,7 +203,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-libgfx-demo");
window->set_icon(app_icon.bitmap_for_size(16));
TRY(window->try_set_main_widget<Canvas>());
(void)TRY(window->try_set_main_widget<Canvas>());
window->show();
return app->exec();

View File

@ -122,7 +122,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-libgfx-demo");
window->set_icon(app_icon.bitmap_for_size(16));
TRY(window->try_set_main_widget<Canvas>());
(void)TRY(window->try_set_main_widget<Canvas>());
window->show();
return app->exec();

View File

@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_title("Model Gallery");
window->set_icon(app_icon.bitmap_for_size(16));
window->resize(430, 480);
TRY(window->try_set_main_widget<GalleryWidget>());
(void)TRY(window->try_set_main_widget<GalleryWidget>());
window->show();
return app->exec();

View File

@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->resize(430, 480);
window->set_title("Widget Gallery");
window->set_icon(app_icon.bitmap_for_size(16));
TRY(window->try_set_main_widget<GalleryWidget>());
(void)TRY(window->try_set_main_widget<GalleryWidget>());
window->show();
return app->exec();