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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/company_base.h b/src/company_base.h
index ecfb61fef..bffe89b11 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -90,8 +90,8 @@ struct Company : PoolItem<Company, CompanyByte, &_Company_pool> {
}
};
-#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)
+#define FOR_ALL_COMPANIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Company, company_index, var, start)
+#define FOR_ALL_COMPANIES(var) FOR_ALL_COMPANIES_FROM(var, 0)
static inline byte ActiveCompanyCount()
{