From 5934e9540256cf0da1cf6e84d2bbbd6382edfe01 Mon Sep 17 00:00:00 2001 From: Pedro Pereira Date: Wed, 24 Nov 2021 00:39:08 +0000 Subject: [PATCH] Pong: Replace construct() with TRY(try_create()) pattern --- Userland/Games/Pong/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index 2d0c9acd8e..bc2172a3c8 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -18,14 +18,14 @@ 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)); TRY(Core::System::unveil("/res", "r")); TRY(Core::System::unveil(nullptr, nullptr)); - auto window = GUI::Window::construct(); + auto window = TRY(GUI::Window::try_create()); window->resize(Pong::Game::game_width, Pong::Game::game_height); auto app_icon = GUI::Icon::default_icon("app-pong"); window->set_icon(app_icon.bitmap_for_size(16));