summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
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;