mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 15:30:00 +00:00
Fix: Using MIN_YEAR for a date is probably wrong, Use MIN_DATE instead. (#11444)
Even with strong types ...
This commit is contained in:
parent
ef385499c7
commit
b5861fd8f3
@ -82,7 +82,7 @@ static const RoadTypeInfo _original_roadtypes[] = {
|
|||||||
0x01,
|
0x01,
|
||||||
|
|
||||||
/* introduction date */
|
/* introduction date */
|
||||||
static_cast<int32_t>(CalendarTime::MIN_YEAR),
|
CalendarTime::MIN_DATE,
|
||||||
|
|
||||||
/* roadtypes required for this to be introduced */
|
/* roadtypes required for this to be introduced */
|
||||||
ROADTYPES_NONE,
|
ROADTYPES_NONE,
|
||||||
|
@ -178,6 +178,9 @@ public:
|
|||||||
/** The date of the first day of the original base year. */
|
/** The date of the first day of the original base year. */
|
||||||
static constexpr TimerGameCalendar::Date DAYS_TILL_ORIGINAL_BASE_YEAR = TimerGameCalendar::DateAtStartOfYear(ORIGINAL_BASE_YEAR);
|
static constexpr TimerGameCalendar::Date DAYS_TILL_ORIGINAL_BASE_YEAR = TimerGameCalendar::DateAtStartOfYear(ORIGINAL_BASE_YEAR);
|
||||||
|
|
||||||
|
/** The absolute minimum date. */
|
||||||
|
static constexpr TimerGameCalendar::Date MIN_DATE = 0;
|
||||||
|
|
||||||
/** The date of the last day of the max year. */
|
/** The date of the last day of the max year. */
|
||||||
static constexpr TimerGameCalendar::Date MAX_DATE = TimerGameCalendar::DateAtStartOfYear(CalendarTime::MAX_YEAR + 1) - 1;
|
static constexpr TimerGameCalendar::Date MAX_DATE = TimerGameCalendar::DateAtStartOfYear(CalendarTime::MAX_YEAR + 1) - 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user