diff options
author | rubidium <rubidium@openttd.org> | 2007-08-02 21:19:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-02 21:19:07 +0000 |
commit | b15c0efaa951425d74e8a9ca4104da72a81fe50c (patch) | |
tree | c9214850b82261724c3e006bdb90aae810fb06bb /src/vehicle.cpp | |
parent | db374f600c319f0d230cf5f84e120ea06b5fa41e (diff) | |
download | openttd-b15c0efaa951425d74e8a9ca4104da72a81fe50c.tar.xz |
(svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle).
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index fbc061c62..86a87c5c6 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -332,7 +332,7 @@ Vehicle *ForceAllocateSpecialVehicle() if (v->index >= (1 << Vehicle_POOL_BLOCK_SIZE_BITS) * BLOCKS_FOR_SPECIAL_VEHICLES) return NULL; - if (!IsValidVehicle(v)) return InitializeVehicle(v); + if (!v->IsValid()) return InitializeVehicle(v); } return NULL; @@ -358,7 +358,7 @@ static Vehicle *AllocateSingleVehicle(VehicleID *skip_vehicles) if (*skip_vehicles < (_Vehicle_pool.GetSize() - offset)) { // make sure the offset in the array is not larger than the array itself for (v = GetVehicle(offset + *skip_vehicles); v != NULL; v = (v->index + 1U < GetVehiclePoolSize()) ? GetVehicle(v->index + 1) : NULL) { (*skip_vehicles)++; - if (!IsValidVehicle(v)) return InitializeVehicle(v); + if (!v->IsValid()) return InitializeVehicle(v); } } |