Merge remote-tracking branch 'upstream/master'

This commit is contained in:
pelya
2021-01-25 00:50:42 +02:00
1076 changed files with 25433 additions and 61762 deletions

View File

@@ -193,7 +193,7 @@ struct TimetableWindow : Window {
case WID_VT_ARRIVAL_DEPARTURE_PANEL:
SetDParamMaxValue(0, MAX_YEAR * DAYS_IN_YEAR, 0, FS_SMALL);
this->deparr_time_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width;
this->deparr_abbr_width = max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_ABBREVIATION).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_ABBREVIATION).width);
this->deparr_abbr_width = std::max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_ABBREVIATION).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_ABBREVIATION).width);
size->width = WD_FRAMERECT_LEFT + this->deparr_abbr_width + 10 + this->deparr_time_width + WD_FRAMERECT_RIGHT;
FALLTHROUGH;
@@ -630,7 +630,7 @@ struct TimetableWindow : Window {
if (!_settings_client.gui.timetable_in_ticks) val *= DAY_TICKS;
}
uint32 p2 = minu(val, UINT16_MAX);
uint32 p2 = std::min<uint32>(val, UINT16_MAX);
DoCommandP(0, p1, p2, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
}