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

@@ -174,9 +174,9 @@ Colour Blitter_32bppBase::ReallyAdjustBrightness(Colour colour, uint8 brightness
/* Reduce overbright strength */
ob /= 2;
return Colour(
r >= 255 ? 255 : min(r + ob * (255 - r) / 256, 255),
g >= 255 ? 255 : min(g + ob * (255 - g) / 256, 255),
b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255),
r >= 255 ? 255 : std::min(r + ob * (255 - r) / 256, 255),
g >= 255 ? 255 : std::min(g + ob * (255 - g) / 256, 255),
b >= 255 ? 255 : std::min(b + ob * (255 - b) / 256, 255),
colour.a);
}