From 82a152b69602de05a28034864185545207639a8c Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 20 Jan 2023 20:06:05 +0100 Subject: LibGfx: Remove `try_` prefix from bitmap creation functions Those don't have any non-try counterpart, so we might as well just omit it. --- Userland/Games/ColorLines/ColorLines.cpp | 2 +- Userland/Games/ColorLines/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Games/ColorLines') diff --git a/Userland/Games/ColorLines/ColorLines.cpp b/Userland/Games/ColorLines/ColorLines.cpp index ec5a66661e..992f51de6b 100644 --- a/Userland/Games/ColorLines/ColorLines.cpp +++ b/Userland/Games/ColorLines/ColorLines.cpp @@ -17,7 +17,7 @@ ColorLines::BitmapArray ColorLines::build_marble_color_bitmaps() { - auto marble_bitmap = MUST(Gfx::Bitmap::try_load_from_file("/res/icons/colorlines/colorlines.png"sv)); + auto marble_bitmap = MUST(Gfx::Bitmap::load_from_file("/res/icons/colorlines/colorlines.png"sv)); float constexpr hue_degrees[Marble::number_of_colors] = { 0, // Red 45, // Brown/Yellow diff --git a/Userland/Games/ColorLines/main.cpp b/Userland/Games/ColorLines/main.cpp index d73a033065..204d6c64a0 100644 --- a/Userland/Games/ColorLines/main.cpp +++ b/Userland/Games/ColorLines/main.cpp @@ -52,7 +52,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto game_menu = TRY(window->try_add_menu("&Game")); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png"sv)), [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/reload.png"sv)), [&](auto&) { game->reset(); }))); TRY(game_menu->try_add_separator()); -- cgit v1.2.3