1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

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
parent da50667bb5
commit a0db5cca8a

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;