From 6221d74644922ea4bbba3ed9cd8bbec42398f77b Mon Sep 17 00:00:00 2001 From: smatz Date: Sat, 16 May 2009 23:34:14 +0000 Subject: (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) --- src/company_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/company_base.h') diff --git a/src/company_base.h b/src/company_base.h index 02efa3ddb..e1ab9c9ca 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -87,10 +87,10 @@ struct Company : PoolItem { static inline bool IsValidCompanyID(CompanyID company) { - return company < MAX_COMPANIES && (uint)company < GetCompanyPoolSize() && GetCompany(company)->IsValid(); + return company < MAX_COMPANIES && (uint)company < GetCompanyPoolSize() && Company::Get(company)->IsValid(); } -#define FOR_ALL_COMPANIES_FROM(d, start) for (d = GetCompany(start); d != NULL; d = (d->index + 1U < GetCompanyPoolSize()) ? GetCompany(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 < GetCompanyPoolSize()) ? Company::Get(d->index + 1U) : NULL) if (d->IsValid()) #define FOR_ALL_COMPANIES(d) FOR_ALL_COMPANIES_FROM(d, 0) static inline byte ActiveCompanyCount() -- cgit v1.2.3-54-g00ecf