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. --- Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ports/SDL2') diff --git a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch index 1277e630b6..bc205082f7 100644 --- a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch +++ b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch @@ -1318,7 +1318,7 @@ index 0000000000000000000000000000000000000000..9c7d4f3f5cedf86ae885330aaf6fae7e + +static RefPtr create_bitmap_from_surface(SDL_Surface& icon) +{ -+ auto bitmap_or_error = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, {icon.w, icon.h}); ++ auto bitmap_or_error = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, {icon.w, icon.h}); + if (bitmap_or_error.is_error()) + return {}; + auto bitmap = bitmap_or_error.release_value(); @@ -1372,7 +1372,7 @@ index 0000000000000000000000000000000000000000..9c7d4f3f5cedf86ae885330aaf6fae7e + dbgln("{}: Creating a new framebuffer of size {}x{}", __FUNCTION__, window->w, window->h); + auto win = SerenityPlatformWindow::from_sdl_window(window); + *format = SDL_PIXELFORMAT_RGB888; -+ auto bitmap_or_error = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, {window->w, window->h}); ++ auto bitmap_or_error = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, {window->w, window->h}); + if (bitmap_or_error.is_error()) + return SDL_OutOfMemory(); + win->widget()->m_buffer = bitmap_or_error.release_value(); -- cgit v1.2.3