Codefix f98b90ac2e: Use to_underlying instead of direct static_cast. (#14790)

This commit is contained in:
Peter Nelson
2025-11-17 18:12:27 +00:00
committed by dP
parent 97e4ed873f
commit b9fea4749c
2 changed files with 3 additions and 3 deletions

View File

@@ -676,7 +676,7 @@ static void DrawTile_Trees(TileInfo *ti)
uint trees = GetTreeCount(ti->tile);
for (uint i = 0; i < trees; i++) {
SpriteID sprite = s[0].sprite + (i == trees - 1 ? static_cast<uint>(GetTreeGrowth(ti->tile)) : 3);
SpriteID sprite = s[0].sprite + (i == trees - 1 ? to_underlying(GetTreeGrowth(ti->tile)) : 3);
PaletteID pal = s[0].pal;
te[i].sprite = sprite;