summaryrefslogtreecommitdiff
path: root/src/spriteloader
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-01-08 10:16:18 +0000
committerGitHub <noreply@github.com>2021-01-08 11:16:18 +0100
commit9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch)
tree3f287d339e15c4902ee415556475fd9b2918d33c /src/spriteloader
parentc1fddb9a6ae5c3af6865461a7295788a341011a2 (diff)
downloadopenttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/spriteloader')
-rw-r--r--src/spriteloader/grf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp
index 058193c34..5e540450d 100644
--- a/src/spriteloader/grf.cpp
+++ b/src/spriteloader/grf.cpp
@@ -164,7 +164,7 @@ bool DecodeSingleSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t fi
if (colour_fmt & SCC_PAL) {
switch (sprite_type) {
case ST_NORMAL: data->m = _palette_remap_grf[file_slot] ? _palmap_w2d[*dest] : *dest; break;
- case ST_FONT: data->m = min(*dest, 2u); break;
+ case ST_FONT: data->m = std::min<uint>(*dest, 2u); break;
default: data->m = *dest; break;
}
/* Magic blue. */
@@ -200,7 +200,7 @@ bool DecodeSingleSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t fi
if (colour_fmt & SCC_PAL) {
switch (sprite_type) {
case ST_NORMAL: sprite->data[i].m = _palette_remap_grf[file_slot] ? _palmap_w2d[*pixel] : *pixel; break;
- case ST_FONT: sprite->data[i].m = min(*pixel, 2u); break;
+ case ST_FONT: sprite->data[i].m = std::min<uint>(*pixel, 2u); break;
default: sprite->data[i].m = *pixel; break;
}
/* Magic blue. */