mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
FlappyBug: Replace construct() with TRY(try_create()) pattern
This commit is contained in:
parent
70a3962ce9
commit
da50667bb5
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue