summaryrefslogtreecommitdiff
path: root/src/company_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/company_base.h')
-rw-r--r--src/company_base.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/company_base.h b/src/company_base.h
index edffdc684..ecfb61fef 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -83,12 +83,12 @@ struct Company : PoolItem<Company, CompanyByte, &_Company_pool> {
uint16 *num_engines; ///< caches the number of engines of each type the company owns (no need to save this)
inline bool IsValid() const { return this->name_1 != 0; }
-};
-static inline bool IsValidCompanyID(CompanyID company)
-{
- return company < MAX_COMPANIES && (uint)company < Company::GetPoolSize() && Company::Get(company)->IsValid();
-}
+ static inline bool IsValidID(CompanyID company)
+ {
+ return company < MAX_COMPANIES && (uint)company < Company::GetPoolSize() && Company::Get(company)->IsValid();
+ }
+};
#define FOR_ALL_COMPANIES_FROM(d, start) for (d = Company::Get(start); d != NULL; d = (d->index + 1U < Company::GetPoolSize()) ? Company::Get(d->index + 1U) : NULL) if (d->IsValid())
#define FOR_ALL_COMPANIES(d) FOR_ALL_COMPANIES_FROM(d, 0)