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

@@ -262,8 +262,8 @@ static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, in
void SndPlayTileFx(SoundID sound, TileIndex tile)
{
/* emits sound from center of the tile */
int x = min(MapMaxX() - 1, TileX(tile)) * TILE_SIZE + TILE_SIZE / 2;
int y = min(MapMaxY() - 1, TileY(tile)) * TILE_SIZE - TILE_SIZE / 2;
int x = std::min(MapMaxX() - 1, TileX(tile)) * TILE_SIZE + TILE_SIZE / 2;
int y = std::min(MapMaxY() - 1, TileY(tile)) * TILE_SIZE - TILE_SIZE / 2;
int z = (y < 0 ? 0 : GetSlopePixelZ(x, y));
Point pt = RemapCoords(x, y, z);
y += 2 * TILE_SIZE;