summaryrefslogtreecommitdiff
path: root/src/company_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-23 12:11:35 +0000
committersmatz <smatz@openttd.org>2009-06-23 12:11:35 +0000
commit22cf8d8480b1a7e1627590ba2c48ab5019764910 (patch)
tree3e214ab81c40d56ef452fa5af33712e0be087fba /src/company_base.h
parent192b9bda7b7405e2f71b1847430b744a67b923ef (diff)
downloadopenttd-22cf8d8480b1a7e1627590ba2c48ab5019764910.tar.xz
(svn r16634) -Codechange: use Company::IsHumanID() instead of IsHumanCompany()
Diffstat (limited to 'src/company_base.h')
-rw-r--r--src/company_base.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/company_base.h b/src/company_base.h
index 6d0f2abd0..35a2e918c 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -82,15 +82,20 @@ struct Company : CompanyPool::PoolItem<&_company_pool> {
static FORCEINLINE bool IsValidAiID(size_t index)
{
- const Company *c = GetIfValid(index);
+ const Company *c = Company::GetIfValid(index);
return c != NULL && c->is_ai;
}
static FORCEINLINE bool IsValidHumanID(size_t index)
{
- const Company *c = GetIfValid(index);
+ const Company *c = Company::GetIfValid(index);
return c != NULL && !c->is_ai;
}
+
+ static FORCEINLINE bool IsHumanID(size_t index)
+ {
+ return !Company::Get(index)->is_ai;
+ }
};
#define FOR_ALL_COMPANIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Company, company_index, var, start)
@@ -98,12 +103,6 @@ struct Company : CompanyPool::PoolItem<&_company_pool> {
Money CalculateCompanyValue(const Company *c);
-static inline bool IsHumanCompany(CompanyID company)
-{
- return !Company::Get(company)->is_ai;
-}
-
-
extern uint _next_competitor_start;
extern uint _cur_company_tick_index;