From c81021e8504d05f0102f793575dbd632d638e8d4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Nov 2019 17:44:48 +0100 Subject: [PATCH] Simplify condition in wxCairoBitmapData ctor Don't test for "bufferFormat == CAIRO_FORMAT_ARGB32" which will be always true in this branch if hasAlpha is true anyhow. No real changes. See #18570. --- src/generic/graphicc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index b47d70ee53..1304902166 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -1530,7 +1530,7 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitm // with alpha in the upper 8 bits, then red, then green, then // blue. The 32-bit quantities are stored native-endian. // Pre-multiplied alpha is used. - unsigned char alpha = (bufferFormat == CAIRO_FORMAT_ARGB32 && hasAlpha) ? p.Alpha() : 255; + unsigned char alpha = hasAlpha ? p.Alpha() : 255; #if defined (__WXMSW__) || defined(__WXOSX__) // MSW and OSX bitmap pixel bits are already premultiplied. *data = (alpha << 24 | p.Red() << 16 | p.Green() << 8 | p.Blue());