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