mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 04:34:16 +01:00
Codechange: replace MAX_UVALUE with std::numeric_limits::max
This commit is contained in:
@@ -406,7 +406,7 @@ static bool FixTTOEngines()
|
||||
/* Make sure for example monorail and maglev are available when they should be */
|
||||
if (TimerGameCalendar::date >= e->intro_date && HasBit(e->info.climates, 0)) {
|
||||
e->flags.Set(EngineFlag::Available);
|
||||
e->company_avail = MAX_UVALUE(CompanyMask);
|
||||
e->company_avail = std::numeric_limits<CompanyMask>::max();
|
||||
e->age = TimerGameCalendar::date > e->intro_date ? (TimerGameCalendar::date - e->intro_date).base() / 30 : 0;
|
||||
}
|
||||
} else {
|
||||
@@ -431,7 +431,7 @@ static bool FixTTOEngines()
|
||||
* if at least one of them was available. */
|
||||
for (uint j = 0; j < lengthof(tto_to_ttd); j++) {
|
||||
if (tto_to_ttd[j] == i && _old_engines[j].company_avail != 0) {
|
||||
e->company_avail = MAX_UVALUE(CompanyMask);
|
||||
e->company_avail = std::numeric_limits<CompanyMask>::max();
|
||||
e->flags.Set(EngineFlag::Available);
|
||||
break;
|
||||
}
|
||||
@@ -441,7 +441,7 @@ static bool FixTTOEngines()
|
||||
}
|
||||
|
||||
e->preview_company = INVALID_COMPANY;
|
||||
e->preview_asked = MAX_UVALUE(CompanyMask);
|
||||
e->preview_asked = std::numeric_limits<CompanyMask>::max();
|
||||
e->preview_wait = 0;
|
||||
e->name = std::string{};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user