1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

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

This commit is contained in:
Pedro Pereira 2021-11-24 00:38:12 +00:00 committed by Andreas Kling
parent 5b33ee20df
commit 92e9b447f4

View file

@ -18,14 +18,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio recvfd sendfd rpath", 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(Breakout::Game::game_width, Breakout::Game::game_height);
window->set_resizable(false);
window->set_double_buffering_enabled(false);