diff options
author | smatz <smatz@openttd.org> | 2009-05-22 14:23:36 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-22 14:23:36 +0000 |
commit | 04723b240ebc7384954f73590be517ad2a47ce04 (patch) | |
tree | ac4bd41288d9d96a256ea0c702d1a75502bfecd9 /src/industry.h | |
parent | b687ac51ee5e8628ed56319df573c903c0c86ef3 (diff) | |
download | openttd-04723b240ebc7384954f73590be517ad2a47ce04.tar.xz |
(svn r16377) -Codechange: unify FOR_ALL_* macros, use separate index variable instead of var->index
Diffstat (limited to 'src/industry.h')
-rw-r--r-- | src/industry.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry.h b/src/industry.h index 988d6e0bb..a99e8fc09 100644 --- a/src/industry.h +++ b/src/industry.h @@ -334,8 +334,8 @@ static inline Industry *GetRandomIndustry() return Industry::Get(index); } -#define FOR_ALL_INDUSTRIES_FROM(i, start) for (i = Industry::Get(start); i != NULL; i = (i->index + 1U < Industry::GetPoolSize()) ? Industry::Get(i->index + 1U) : NULL) if (i->IsValid()) -#define FOR_ALL_INDUSTRIES(i) FOR_ALL_INDUSTRIES_FROM(i, 0) +#define FOR_ALL_INDUSTRIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Industry, industry_index, var, start) +#define FOR_ALL_INDUSTRIES(var) FOR_ALL_INDUSTRIES_FROM(var, 0) static const uint8 IT_INVALID = 255; |