GameOfLife: Replace construct() with TRY(try_create()) pattern

This commit is contained in:
Pedro Pereira 2021-11-24 00:38:33 +00:00 committed by Andreas Kling
commit a0db5cca8a
Notes: sideshowbarker 2024-07-18 00:45:06 +09:00

View file

@ -27,7 +27,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio rpath recvfd sendfd unix", nullptr));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
@ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-gameoflife");
auto window = GUI::Window::construct();
auto window = TRY(GUI::Window::try_create());
window->set_icon(app_icon.bitmap_for_size(16));
size_t board_columns = 35;