Codechange: use TimerGameCalendar::Year and friends when working with years (#11188)

This commit is contained in:
Patric Stout
2023-08-12 16:02:31 +02:00
committed by GitHub
parent 01f55eb734
commit b7acf9e50e
8 changed files with 13 additions and 13 deletions

View File

@@ -2438,7 +2438,7 @@ struct VehicleDetailsWindow : Window {
case WID_VD_SERVICING_INTERVAL:
SetDParamMaxValue(0, MAX_SERVINT_DAYS); // Roughly the maximum interval
SetDParamMaxValue(1, MAX_YEAR * DAYS_IN_YEAR); // Roughly the maximum year
SetDParamMaxValue(1, DateAtStartOfYear(MAX_YEAR)); // Roughly the maximum year
size->width = std::max(
GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT).width,
GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS).width