1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 02:42:42 +01:00

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

@@ -2041,15 +2041,15 @@ bool AfterLoadGame()
/* More companies ... */
for (Company *c : Company::Iterate()) {
if (c->bankrupt_asked == 0xFF) c->bankrupt_asked = MAX_UVALUE(CompanyMask);
if (c->bankrupt_asked == 0xFF) c->bankrupt_asked = std::numeric_limits<CompanyMask>::max();
}
for (Engine *e : Engine::Iterate()) {
if (e->company_avail == 0xFF) e->company_avail = MAX_UVALUE(CompanyMask);
if (e->company_avail == 0xFF) e->company_avail = std::numeric_limits<CompanyMask>::max();
}
for (Town *t : Town::Iterate()) {
if (t->have_ratings == 0xFF) t->have_ratings = MAX_UVALUE(CompanyMask);
if (t->have_ratings == 0xFF) t->have_ratings = std::numeric_limits<CompanyMask>::max();
for (uint i = 8; i != MAX_COMPANIES; i++) t->ratings[i] = RATING_INITIAL;
}
}