diff options
author | smatz <smatz@openttd.org> | 2009-05-16 23:44:36 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-16 23:44:36 +0000 |
commit | ed1e54bd84074412ea9f273b7cd86aed42d844ce (patch) | |
tree | 4a5ab5dbd304f9a53f8f0065bc6965b1680ded78 /src/company_base.h | |
parent | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (diff) | |
download | openttd-ed1e54bd84074412ea9f273b7cd86aed42d844ce.tar.xz |
(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
Diffstat (limited to 'src/company_base.h')
-rw-r--r-- | src/company_base.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/company_base.h b/src/company_base.h index e1ab9c9ca..edffdc684 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -87,10 +87,10 @@ struct Company : PoolItem<Company, CompanyByte, &_Company_pool> { static inline bool IsValidCompanyID(CompanyID company) { - return company < MAX_COMPANIES && (uint)company < GetCompanyPoolSize() && Company::Get(company)->IsValid(); + 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 < GetCompanyPoolSize()) ? Company::Get(d->index + 1U) : NULL) if (d->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) static inline byte ActiveCompanyCount() |