1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 01:12:39 +01:00

Codechange: use Date/Year constructor explicitly

This commit is contained in:
Rubidium
2025-01-01 09:13:39 +01:00
committed by rubidium42
parent f55ba40b13
commit 3956ed086a
22 changed files with 46 additions and 48 deletions

View File

@@ -113,7 +113,7 @@ static int32_t ClickChangeDateCheat(int32_t new_value, int32_t)
/* If not using wallclock units, we keep economy date in sync with calendar date and must change it also. */
if (!TimerGameEconomy::UsingWallclockUnits()) {
/* Keep economy and calendar dates synced. */
TimerGameEconomy::Date new_economy_date = new_calendar_date.base();
TimerGameEconomy::Date new_economy_date{new_calendar_date.base()};
/* Shift cached dates before we change the date. */
for (auto v : Vehicle::Iterate()) v->ShiftDates(new_economy_date - TimerGameEconomy::date);