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

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

This commit is contained in:
Pedro Pereira 2021-11-24 00:39:17 +00:00 committed by Andreas Kling
parent 5934e95402
commit 2c6dc6d5f6

View file

@ -22,7 +22,7 @@ ErrorOr<int> 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("Snake");
@ -33,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-snake");
auto window = GUI::Window::construct();
auto window = TRY(GUI::Window::try_create());
window->set_double_buffering_enabled(false);
window->set_title("Snake");