1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00: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

@@ -443,7 +443,7 @@ uint Engine::GetDisplayMaxTractiveEffort() const
TimerGameCalendar::Date Engine::GetLifeLengthInDays() const
{
/* Assume leap years; this gives the player a bit more than the given amount of years, but never less. */
return (this->info.lifelength + _settings_game.vehicle.extend_vehicle_life).base() * CalendarTime::DAYS_IN_LEAP_YEAR;
return TimerGameCalendar::Date{(this->info.lifelength + _settings_game.vehicle.extend_vehicle_life).base() * CalendarTime::DAYS_IN_LEAP_YEAR};
}
/**
@@ -1320,7 +1320,7 @@ bool IsEngineRefittable(EngineID engine)
*/
void CheckEngines()
{
TimerGameCalendar::Date min_date = INT32_MAX;
TimerGameCalendar::Date min_date{INT32_MAX};
for (const Engine *e : Engine::Iterate()) {
if (!e->IsEnabled()) continue;