Codechange: replace some min/clamp constructs to ClampTo

This commit is contained in:
Rubidium
2023-04-29 10:19:43 +02:00
committed by rubidium42
parent 19ec4e8beb
commit fb856e16c1
18 changed files with 59 additions and 60 deletions

View File

@@ -1923,7 +1923,7 @@ bool AfterLoadGame()
/* Replace "house construction year" with "house age" */
if (IsTileType(t, MP_HOUSE) && IsHouseCompleted(t)) {
t.m5() = Clamp(TimerGameCalendar::year - (t.m5() + ORIGINAL_BASE_YEAR), 0, 0xFF);
t.m5() = ClampTo<uint8_t>(TimerGameCalendar::year - (t.m5() + ORIGINAL_BASE_YEAR));
}
}
}