Codechange: make CompanyMask a BaseBitSet implementation

This commit is contained in:
Rubidium
2025-02-08 10:08:36 +01:00
committed by rubidium42
parent e972033e11
commit ec492cb267
27 changed files with 116 additions and 99 deletions
+3 -3
View File
@@ -2041,15 +2041,15 @@ bool AfterLoadGame()
/* More companies ... */
for (Company *c : Company::Iterate()) {
if (c->bankrupt_asked == 0xFF) c->bankrupt_asked = std::numeric_limits<CompanyMask>::max();
if (c->bankrupt_asked.base() == 0xFF) c->bankrupt_asked = std::numeric_limits<CompanyMask>::max();
}
for (Engine *e : Engine::Iterate()) {
if (e->company_avail == 0xFF) e->company_avail = std::numeric_limits<CompanyMask>::max();
if (e->company_avail.base() == 0xFF) e->company_avail = std::numeric_limits<CompanyMask>::max();
}
for (Town *t : Town::Iterate()) {
if (t->have_ratings == 0xFF) t->have_ratings = std::numeric_limits<CompanyMask>::max();
if (t->have_ratings.base() == 0xFF) t->have_ratings = std::numeric_limits<CompanyMask>::max();
for (uint i = 8; i != MAX_COMPANIES; i++) t->ratings[i] = RATING_INITIAL;
}
}