mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 13:02:28 +00:00
Pong: Replace construct() with TRY(try_create()) pattern
This commit is contained in:
parent
36056c1cba
commit
5934e95402
Notes:
sideshowbarker
2024-07-18 00:44:55 +09:00
Author: https://github.com/pmhpereira
Commit: 5934e95402
Pull-request: https://github.com/SerenityOS/serenity/pull/11053
1 changed files with 2 additions and 2 deletions
|
@ -18,14 +18,14 @@ 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));
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
|
||||
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->resize(Pong::Game::game_width, Pong::Game::game_height);
|
||||
auto app_icon = GUI::Icon::default_icon("app-pong");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue