diff options
author | Pedro Pereira <pmh.pereira@gmail.com> | 2021-11-24 00:38:38 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-24 13:51:07 +0100 |
commit | 0a800cc1bb2cc6bebcc0683aca4a28462987ab49 (patch) | |
tree | abbc8b095b49b4e5e2f2625876df13d05992c54a | |
parent | a0db5cca8a5936d84abf26ad9c5089bcc4ed6b72 (diff) | |
download | serenity-0a800cc1bb2cc6bebcc0683aca4a28462987ab49.zip |
Hearts: Replace construct() with TRY(try_create()) pattern
-rw-r--r-- | Userland/Games/Hearts/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Games/Hearts/main.cpp b/Userland/Games/Hearts/main.cpp index 862d04fcf5..6964efdf1d 100644 --- a/Userland/Games/Hearts/main.cpp +++ b/Userland/Games/Hearts/main.cpp @@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - auto app = GUI::Application::construct(arguments); + auto app = TRY(GUI::Application::try_create(arguments)); auto app_icon = GUI::Icon::default_icon("app-hearts"); Config::pledge_domains("Hearts"); @@ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) 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->set_title("Hearts"); auto& widget = window->set_main_widget<GUI::Widget>(); |