summaryrefslogtreecommitdiff
path: root/src/vehicle_base.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/vehicle_base.h
parented1e54bd84074412ea9f273b7cd86aed42d844ce (diff)
downloadopenttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r--src/vehicle_base.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h
index 9d611c01a..47e87d0a4 100644
--- a/src/vehicle_base.h
+++ b/src/vehicle_base.h
@@ -660,16 +660,6 @@ static inline uint GetNumVehicles()
#define FOR_ALL_VEHICLES_FROM(v, start) for (v = Vehicle::Get(start); v != NULL; v = (v->index + 1U < Vehicle::GetPoolSize()) ? Vehicle::Get(v->index + 1) : NULL) if (v->IsValid())
#define FOR_ALL_VEHICLES(v) FOR_ALL_VEHICLES_FROM(v, 0)
-/**
- * Check if an index is a vehicle-index (so between 0 and max-vehicles)
- * @param index of the vehicle to query
- * @return Returns true if the vehicle-id is in range
- */
-static inline bool IsValidVehicleID(uint index)
-{
- return index < Vehicle::GetPoolSize() && Vehicle::Get(index)->IsValid();
-}
-
/** Generates sequence of free UnitID numbers */
struct FreeUnitIDGenerator {