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

@@ -65,8 +65,8 @@ static Dimension GetMaxTreeSpriteSize()
for (int i = base; i < base + count; i++) {
if (i >= (int)lengthof(tree_sprites)) return size;
this_size = GetSpriteSize(tree_sprites[i].sprite, &offset);
size.width = max<int>(size.width, 2 * max<int>(this_size.width, -offset.x));
size.height = max<int>(size.height, max<int>(this_size.height, -offset.y));
size.width = std::max<int>(size.width, 2 * std::max<int>(this_size.width, -offset.x));
size.height = std::max<int>(size.height, std::max<int>(this_size.height, -offset.y));
}
return size;