Codechange: strongly type CompanyID

This commit is contained in:
Rubidium
2025-02-10 18:08:53 +01:00
committed by rubidium42
parent 5401ab1f7b
commit ab8177ea77
37 changed files with 92 additions and 97 deletions

View File

@@ -457,7 +457,7 @@ uint32_t GetNearbyTileInformation(TileIndex tile, bool grf_version8)
uint32_t GetCompanyInfo(CompanyID owner, const Livery *l)
{
if (l == nullptr && Company::IsValidID(owner)) l = &Company::Get(owner)->livery[LS_DEFAULT];
return owner | (Company::IsValidAiID(owner) ? 0x10000 : 0) | (l != nullptr ? (l->colour1 << 24) | (l->colour2 << 28) : 0);
return owner.base() | (Company::IsValidAiID(owner) ? 0x10000 : 0) | (l != nullptr ? (l->colour1 << 24) | (l->colour2 << 28) : 0);
}
/**