Merge remote-tracking branch 'upstream/1.11' into 1.11

This commit is contained in:
dP
2021-01-25 22:53:44 +03:00
1111 changed files with 23665 additions and 81723 deletions

View File

@@ -195,7 +195,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;
@@ -629,7 +629,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));
}