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/signs_base.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/signs_base.h')
-rw-r--r-- | src/signs_base.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signs_base.h b/src/signs_base.h index dd8d13bf0..e037fdc44 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -31,7 +31,7 @@ struct Sign : PoolItem<Sign, SignID, &_Sign_pool> { inline bool IsValid() const { return this->owner != INVALID_OWNER; } }; -#define FOR_ALL_SIGNS_FROM(ss, start) for (ss = Sign::Get(start); ss != NULL; ss = (ss->index + 1U < Sign::GetPoolSize()) ? Sign::Get(ss->index + 1U) : NULL) if (ss->IsValid()) -#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0) +#define FOR_ALL_SIGNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Sign, sign_index, var, start) +#define FOR_ALL_SIGNS(var) FOR_ALL_SIGNS_FROM(var, 0) #endif /* SIGNS_BASE_H */ |