From 75b7880f54c68a34437da4fcc1115920801b1e55 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 25 Jan 2021 12:41:08 -0500 Subject: [PATCH] LibGfx: Remove unreachable branch in Painter::draw_scaled_bitmap This is in the else block of a `(source.has_alpha_channel() || opacity != 1.0f)` conditional, so it's guaranteed that !source.has_alpha_channel() in here, which means source.format() can't be RGBA32. No behavior change. --- Userland/Libraries/LibGfx/Painter.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index baf2a7a7e7..d730682b60 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -877,9 +877,6 @@ void Painter::draw_scaled_bitmap(const IntRect& a_dst_rect, const Gfx::Bitmap& s case BitmapFormat::RGB32: do_draw_scaled_bitmap(*m_target, dst_rect, clipped_rect, source, src_rect, get_pixel, opacity); break; - case BitmapFormat::RGBA32: - do_draw_scaled_bitmap(*m_target, dst_rect, clipped_rect, source, src_rect, get_pixel, opacity); - break; case BitmapFormat::Indexed8: do_draw_scaled_bitmap(*m_target, dst_rect, clipped_rect, source, src_rect, get_pixel, opacity); break;