Codechange: replace MAX_UVALUE with std::numeric_limits::max

This commit is contained in:
Rubidium
2025-01-30 17:09:47 +01:00
committed by rubidium42
parent f67589d96e
commit 4ca1fe6c32
14 changed files with 29 additions and 28 deletions

View File

@@ -744,7 +744,7 @@ void StartupOneEngine(Engine *e, const TimerGameCalendar::YearMonthDay &aging_ym
int intro_months = intro_ymd.year.base() * 12 + intro_ymd.month;
if (intro_ymd.day > 1) intro_months++; // Engines are introduced at the first month start at/after intro date.
e->age = aging_months - intro_months;
e->company_avail = MAX_UVALUE(CompanyMask);
e->company_avail = std::numeric_limits<CompanyMask>::max();
e->flags.Set(EngineFlag::Available);
}
@@ -885,7 +885,7 @@ static void AcceptEnginePreview(EngineID eid, CompanyID company, int recursion_d
Engine *e = Engine::Get(eid);
e->preview_company = INVALID_COMPANY;
e->preview_asked = MAX_UVALUE(CompanyMask);
e->preview_asked = std::numeric_limits<CompanyMask>::max();
EnableEngineForCompany(eid, company);
@@ -980,7 +980,7 @@ static IntervalTimer<TimerGameCalendar> _calendar_engines_daily({TimerGameCalend
e->preview_company = GetPreviewCompany(e);
if (e->preview_company == INVALID_COMPANY) {
e->preview_asked = MAX_UVALUE(CompanyMask);
e->preview_asked = std::numeric_limits<CompanyMask>::max();
continue;
}
@@ -1109,7 +1109,7 @@ static void NewVehicleAvailable(Engine *e)
AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type);
/* Now available for all companies */
e->company_avail = MAX_UVALUE(CompanyMask);
e->company_avail = std::numeric_limits<CompanyMask>::max();
/* Do not introduce new rail wagons */
if (IsWagon(index)) return;