Codechange: replace ClampToI32/U16 with ClampTo<int32_t/uint16_t>

This commit is contained in:
Rubidium
2023-04-29 09:25:51 +02:00
committed by rubidium42
parent 969a3dc0f3
commit 19ec4e8beb
10 changed files with 67 additions and 98 deletions

View File

@@ -2957,7 +2957,7 @@ CommandCost CmdExpandTown(DoCommandFlag flags, TownID town_id, uint32 grow_amoun
if (flags & DC_EXEC) {
/* The more houses, the faster we grow */
if (grow_amount == 0) {
uint amount = RandomRange(ClampToU16(t->cache.num_houses / 10)) + 3;
uint amount = RandomRange(ClampTo<uint16_t>(t->cache.num_houses / 10)) + 3;
t->cache.num_houses += amount;
UpdateTownRadius(t);