1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

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

@@ -742,9 +742,9 @@ struct ScriptDebugWindow : public Window {
*/
bool IsValidDebugCompany(CompanyID company) const
{
switch (company) {
case INVALID_COMPANY: return false;
case OWNER_DEITY: return Game::GetInstance() != nullptr;
switch (company.base()) {
case INVALID_COMPANY.base(): return false;
case OWNER_DEITY.base(): return Game::GetInstance() != nullptr;
default: return Company::IsValidAiID(company);
}
}