summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
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.cpp
parented1e54bd84074412ea9f273b7cd86aed42d844ce (diff)
downloadopenttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 8982c23e3..94842b383 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -509,7 +509,7 @@ void Vehicle::PreDestructor()
{
if (CleaningPool()) return;
- if (IsValidStationID(this->last_station_visited)) {
+ if (Station::IsValidID(this->last_station_visited)) {
Station::Get(this->last_station_visited)->loading_vehicles.remove(this);
HideFillingPercent(&this->fill_percent_te_id);
@@ -520,7 +520,7 @@ void Vehicle::PreDestructor()
if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id);
DeleteGroupHighlightOfVehicle(this);
- if (IsValidGroupID(this->group_id)) Group::Get(this->group_id)->num_engines[this->engine_type]--;
+ if (Group::IsValidID(this->group_id)) Group::Get(this->group_id)->num_engines[this->engine_type]--;
if (this->IsPrimaryVehicle()) DecreaseGroupNumVehicle(this->group_id);
}
@@ -1283,7 +1283,7 @@ bool CanBuildVehicleInfrastructure(VehicleType type)
{
assert(IsCompanyBuildableVehicleType(type));
- if (!IsValidCompanyID(_local_company)) return false;
+ if (!Company::IsValidID(_local_company)) return false;
if (_settings_client.gui.always_build_infrastructure) return true;
UnitID max;