From a0db5cca8a5936d84abf26ad9c5089bcc4ed6b72 Mon Sep 17 00:00:00 2001 From: Pedro Pereira Date: Wed, 24 Nov 2021 00:38:33 +0000 Subject: [PATCH] GameOfLife: Replace construct() with TRY(try_create()) pattern --- Userland/Games/GameOfLife/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Games/GameOfLife/main.cpp b/Userland/Games/GameOfLife/main.cpp index dec2c28fb6..455623738f 100644 --- a/Userland/Games/GameOfLife/main.cpp +++ b/Userland/Games/GameOfLife/main.cpp @@ -27,7 +27,7 @@ ErrorOr 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 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;