Codechange: Remove min/max functions in favour of STL variants (#8502)

This commit is contained in:
Charles Pigott
2021-01-08 10:16:18 +00:00
committed by GitHub
parent c1fddb9a6a
commit 9b800a96ed
181 changed files with 900 additions and 954 deletions

View File

@@ -80,7 +80,7 @@ Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::Sprite *sprite, Alloca
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. */