summaryrefslogtreecommitdiff
path: root/src/group.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-17 01:00:56 +0000
committersmatz <smatz@openttd.org>2009-05-17 01:00:56 +0000
commit871107f52952ee59c353feab933126ed206e60bf (patch)
tree482884dfedc1700bddb8812f1de755212ed8bb22 /src/group.h
parented1e54bd84074412ea9f273b7cd86aed42d844ce (diff)
downloadopenttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/group.h')
-rw-r--r--src/group.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/group.h b/src/group.h
index 84efd6e0e..445e3a66f 100644
--- a/src/group.h
+++ b/src/group.h
@@ -30,11 +30,6 @@ struct Group : PoolItem<Group, GroupID, &_Group_pool> {
};
-static inline bool IsValidGroupID(GroupID index)
-{
- return index < Group::GetPoolSize() && Group::Get(index)->IsValid();
-}
-
static inline bool IsDefaultGroupID(GroupID index)
{
return index == DEFAULT_GROUP;
@@ -77,12 +72,12 @@ uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e);
static inline void IncreaseGroupNumVehicle(GroupID id_g)
{
- if (IsValidGroupID(id_g)) Group::Get(id_g)->num_vehicle++;
+ if (Group::IsValidID(id_g)) Group::Get(id_g)->num_vehicle++;
}
static inline void DecreaseGroupNumVehicle(GroupID id_g)
{
- if (IsValidGroupID(id_g)) Group::Get(id_g)->num_vehicle--;
+ if (Group::IsValidID(id_g)) Group::Get(id_g)->num_vehicle--;
}