1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

Chess: Replace construct() with TRY(try_create()) pattern

This commit is contained in:
Pedro Pereira 2021-11-24 00:38:18 +00:00 committed by Andreas Kling
parent 92e9b447f4
commit 70a3962ce9

View file

@ -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"));