summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-02 21:19:07 +0000
committerrubidium <rubidium@openttd.org>2007-08-02 21:19:07 +0000
commit99da45988a70436692c5062e50b4239e4d948f66 (patch)
treec9214850b82261724c3e006bdb90aae810fb06bb /src/vehicle.cpp
parent032de036dd612210c45926b26ff8afa9d3ed4e5c (diff)
downloadopenttd-99da45988a70436692c5062e50b4239e4d948f66.tar.xz
(svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle).
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp4
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);
}
}