(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()

This commit is contained in:
smatz
2009-05-16 23:44:36 +00:00
parent d495dc5dbc
commit cf986c3099
26 changed files with 66 additions and 62 deletions

View File

@@ -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();
}