(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
This commit is contained in:
@@ -649,15 +649,15 @@ static inline VehicleID GetMaxVehicleIndex()
|
||||
* _really_ returns the highest index. Now it just returns
|
||||
* the next safe value we are sure about everything is below.
|
||||
*/
|
||||
return GetVehiclePoolSize() - 1;
|
||||
return Vehicle::GetPoolSize() - 1;
|
||||
}
|
||||
|
||||
static inline uint GetNumVehicles()
|
||||
{
|
||||
return GetVehiclePoolSize();
|
||||
return Vehicle::GetPoolSize();
|
||||
}
|
||||
|
||||
#define FOR_ALL_VEHICLES_FROM(v, start) for (v = Vehicle::Get(start); v != NULL; v = (v->index + 1U < GetVehiclePoolSize()) ? Vehicle::Get(v->index + 1) : NULL) if (v->IsValid())
|
||||
#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)
|
||||
|
||||
/**
|
||||
@@ -667,7 +667,7 @@ static inline uint GetNumVehicles()
|
||||
*/
|
||||
static inline bool IsValidVehicleID(uint index)
|
||||
{
|
||||
return index < GetVehiclePoolSize() && Vehicle::Get(index)->IsValid();
|
||||
return index < Vehicle::GetPoolSize() && Vehicle::Get(index)->IsValid();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user