diff --git a/src/blitter/32bpp_sse2.cpp b/src/blitter/32bpp_sse2.cpp --- a/src/blitter/32bpp_sse2.cpp +++ b/src/blitter/32bpp_sse2.cpp @@ -80,7 +80,7 @@ Sprite *Blitter_32bppSSE_Base::Encode(co if (src->m >= PALETTE_ANIM_START) has_anim = true; /* Get brightest value (or default brightness if it's a black pixel). */ - const uint8 rgb_max = max(src->r, max(src->g, src->b)); + const uint8 rgb_max = std::max({src->r, src->g, src->b}); dst_mv->v = (rgb_max == 0) ? Blitter_32bppBase::DEFAULT_BRIGHTNESS : rgb_max; /* Pre-convert the mapping channel to a RGB value. */