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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user