diff options
author | smatz <smatz@openttd.org> | 2009-05-16 23:34:14 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-16 23:34:14 +0000 |
commit | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (patch) | |
tree | 0069bbd6bb7525754c5d9353132f5dc64a0996cc /src/group.h | |
parent | 814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff) | |
download | openttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz |
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/group.h')
-rw-r--r-- | src/group.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/group.h b/src/group.h index 9c4d7ffec..618d1407f 100644 --- a/src/group.h +++ b/src/group.h @@ -32,7 +32,7 @@ struct Group : PoolItem<Group, GroupID, &_Group_pool> { static inline bool IsValidGroupID(GroupID index) { - return index < GetGroupPoolSize() && GetGroup(index)->IsValid(); + return index < GetGroupPoolSize() && Group::Get(index)->IsValid(); } static inline bool IsDefaultGroupID(GroupID index) @@ -50,7 +50,7 @@ static inline bool IsAllGroupID(GroupID id_g) return id_g == ALL_GROUP; } -#define FOR_ALL_GROUPS_FROM(g, start) for (g = GetGroup(start); g != NULL; g = (g->index + 1U < GetGroupPoolSize()) ? GetGroup(g->index + 1) : NULL) if (g->IsValid()) +#define FOR_ALL_GROUPS_FROM(g, start) for (g = Group::Get(start); g != NULL; g = (g->index + 1U < GetGroupPoolSize()) ? Group::Get(g->index + 1) : NULL) if (g->IsValid()) #define FOR_ALL_GROUPS(g) FOR_ALL_GROUPS_FROM(g, 0) /** @@ -77,12 +77,12 @@ uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e); static inline void IncreaseGroupNumVehicle(GroupID id_g) { - if (IsValidGroupID(id_g)) GetGroup(id_g)->num_vehicle++; + if (IsValidGroupID(id_g)) Group::Get(id_g)->num_vehicle++; } static inline void DecreaseGroupNumVehicle(GroupID id_g) { - if (IsValidGroupID(id_g)) GetGroup(id_g)->num_vehicle--; + if (IsValidGroupID(id_g)) Group::Get(id_g)->num_vehicle--; } |