Strong typedef: Use strong typedefs for date, date tick, minutes types
Add delta types Adjust/add type conversion functions Add various utility methods on types Remove the various minute macros Fix some minute conversion inconsistencies
This commit is contained in:
@@ -325,7 +325,7 @@ RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date)
|
||||
if (rti->label == 0) continue;
|
||||
|
||||
/* Not date introduced. */
|
||||
if (!IsInsideMM(rti->introduction_date, 0, MAX_DAY)) continue;
|
||||
if (!IsInsideMM(rti->introduction_date, 0, MAX_DATE.base())) continue;
|
||||
|
||||
/* Not yet introduced at this date. */
|
||||
if (rti->introduction_date > date) continue;
|
||||
@@ -403,7 +403,7 @@ RailTypes GetRailTypes(bool introduces)
|
||||
}
|
||||
}
|
||||
|
||||
if (introduces) return AddDateIntroducedRailTypes(rts, MAX_DAY);
|
||||
if (introduces) return AddDateIntroducedRailTypes(rts, MAX_DATE);
|
||||
return rts;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user