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/group.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/group.h')
-rw-r--r-- | src/group.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/group.h b/src/group.h index 364514f56..193568ca0 100644 --- a/src/group.h +++ b/src/group.h @@ -45,8 +45,8 @@ static inline bool IsAllGroupID(GroupID id_g) return id_g == ALL_GROUP; } -#define FOR_ALL_GROUPS_FROM(g, start) for (g = Group::Get(start); g != NULL; g = (g->index + 1U < Group::GetPoolSize()) ? Group::Get(g->index + 1) : NULL) if (g->IsValid()) -#define FOR_ALL_GROUPS(g) FOR_ALL_GROUPS_FROM(g, 0) +#define FOR_ALL_GROUPS_FROM(var, start) FOR_ALL_ITEMS_FROM(Group, group_index, var, start) +#define FOR_ALL_GROUPS(var) FOR_ALL_GROUPS_FROM(var, 0) /** * Get the current size of the GroupPool |