summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Pereira <pmh.pereira@gmail.com>2021-11-24 00:38:18 +0000
committerAndreas Kling <kling@serenityos.org>2021-11-24 13:51:07 +0100
commit70a3962ce91cd71f46efd1e9f586351735eea5ad (patch)
tree5ec254445dfbc00bb6061ca4c2ff0bbe82dd0828
parent92e9b447f4815548744a8a66ff91306971593647 (diff)
downloadserenity-70a3962ce91cd71f46efd1e9f586351735eea5ad.zip
Chess: Replace construct() with TRY(try_create()) pattern
-rw-r--r--Userland/Games/Chess/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp
index 8d67dbdd13..78842f55e7 100644
--- a/Userland/Games/Chess/main.cpp
+++ b/Userland/Games/Chess/main.cpp
@@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec unix", nullptr));
- auto app = GUI::Application::construct(arguments);
+ auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domains("Chess");
@@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-chess");
- auto window = GUI::Window::construct();
+ auto window = TRY(GUI::Window::try_create());
auto& widget = window->set_main_widget<ChessWidget>();
TRY(Core::System::unveil("/res", "r"));