From 92e9b447f4815548744a8a66ff91306971593647 Mon Sep 17 00:00:00 2001 From: Pedro Pereira Date: Wed, 24 Nov 2021 00:38:12 +0000 Subject: [PATCH] Breakout: Replace construct() with TRY(try_create()) pattern --- Userland/Games/Breakout/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index 7017e2e12d..4f4c9e7794 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -18,14 +18,14 @@ ErrorOr serenity_main(Main::Arguments arguments) { TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr)); - auto app = GUI::Application::construct(arguments); + auto app = TRY(GUI::Application::try_create(arguments)); TRY(Core::System::pledge("stdio recvfd sendfd rpath", 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(Breakout::Game::game_width, Breakout::Game::game_height); window->set_resizable(false); window->set_double_buffering_enabled(false);