Replace DATE_UNIT_SIZE macro with a function

This commit is contained in:
Jonathan G Rennison
2024-02-07 20:12:39 +00:00
parent d39236d50c
commit d456f4a3a5
9 changed files with 26 additions and 16 deletions

View File

@@ -928,7 +928,7 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
/* The vehicle has been cancelled. */
DrawString(status_left, status_right, y + 1, STR_DEPARTURES_CANCELLED);
} else{
if (d->lateness <= DATE_UNIT_SIZE && d->scheduled_tick > now_date) {
if (d->lateness <= TimetableDisplayUnitSize() && d->scheduled_tick > now_date) {
/* We have no evidence that the vehicle is late, so assume it is on time. */
DrawString(status_left, status_right, y + 1, STR_DEPARTURES_ON_TIME);
} else {