diff options
author | Pedro Pereira <pmh.pereira@gmail.com> | 2021-11-24 00:38:27 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-24 13:51:07 +0100 |
commit | da50667bb58808788b213882b3b684da94d6594d (patch) | |
tree | 621f6c679336d6f9189fc20183a77b9b478020a4 | |
parent | 70a3962ce91cd71f46efd1e9f586351735eea5ad (diff) | |
download | serenity-da50667bb58808788b213882b3b684da94d6594d.zip |
FlappyBug: Replace construct() with TRY(try_create()) pattern
-rw-r--r-- | Userland/Games/FlappyBug/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Games/FlappyBug/main.cpp b/Userland/Games/FlappyBug/main.cpp index b32bdb0de4..5c721b2bdf 100644 --- a/Userland/Games/FlappyBug/main.cpp +++ b/Userland/Games/FlappyBug/main.cpp @@ -19,7 +19,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("FlappyBug"); @@ -30,7 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) u32 high_score = Config::read_i32("FlappyBug", "Game", "HighScore", 0); - auto window = GUI::Window::construct(); + auto window = TRY(GUI::Window::try_create()); window->resize(FlappyBug::Game::game_width, FlappyBug::Game::game_height); auto app_icon = GUI::Icon::default_icon("app-flappybug"); window->set_icon(app_icon.bitmap_for_size(16)); |