mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
Demos: Cast unused smart-pointer return values to void
This commit is contained in:
parent
7196570f9b
commit
7e05ccaa70
Notes:
sideshowbarker
2024-07-17 23:08:43 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/7e05ccaa70c Pull-request: https://github.com/SerenityOS/serenity/pull/11151
@ -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());
|
||||
|
@ -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(); })));
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user