From da50667bb58808788b213882b3b684da94d6594d Mon Sep 17 00:00:00 2001 From: Pedro Pereira Date: Wed, 24 Nov 2021 00:38:27 +0000 Subject: FlappyBug: Replace construct() with TRY(try_create()) pattern --- Userland/Games/FlappyBug/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Games/FlappyBug/main.cpp b/Userland/Games/FlappyBug/main.cpp index b32bdb0de4..5c721b2bdf 100644 --- a/Userland/Games/FlappyBug/main.cpp +++ b/Userland/Games/FlappyBug/main.cpp @@ -19,7 +19,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)); Config::pledge_domains("FlappyBug"); @@ -30,7 +30,7 @@ ErrorOr serenity_main(Main::Arguments arguments) u32 high_score = Config::read_i32("FlappyBug", "Game", "HighScore", 0); - auto window = GUI::Window::construct(); + auto window = TRY(GUI::Window::try_create()); window->resize(FlappyBug::Game::game_width, FlappyBug::Game::game_height); auto app_icon = GUI::Icon::default_icon("app-flappybug"); window->set_icon(app_icon.bitmap_for_size(16)); -- cgit v1.2.3