summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r--src/vehicle_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index e127b6107..72e1df6d2 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -61,7 +61,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
/* Disable the effect of p2 bit 0, when DC_AUTOREPLACE is not set */
if ((flags & DC_AUTOREPLACE) == 0) SetBit(p2, 0);
- if (!IsValidVehicleID(p1)) return CMD_ERROR;
+ if (!Vehicle::IsValidID(p1)) return CMD_ERROR;
Vehicle *v = Vehicle::Get(p1);
@@ -334,7 +334,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
CommandCost total_cost(EXPENSES_NEW_VEHICLES);
uint32 build_argument = 2;
- if (!IsValidVehicleID(p1)) return CMD_ERROR;
+ if (!Vehicle::IsValidID(p1)) return CMD_ERROR;
Vehicle *v = Vehicle::Get(p1);
Vehicle *v_front = v;
@@ -532,7 +532,7 @@ CommandCost SendAllVehiclesToDepot(VehicleType type, DoCommandFlag flags, bool s
*/
CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
- if (!IsValidVehicleID(p1)) return CMD_ERROR;
+ if (!Vehicle::IsValidID(p1)) return CMD_ERROR;
Vehicle *v = Vehicle::Get(p1);
if (!CheckOwnership(v->owner)) return CMD_ERROR;
@@ -565,7 +565,7 @@ CommandCost CmdChangeServiceInt(TileIndex tile, DoCommandFlag flags, uint32 p1,
{
uint16 serv_int = GetServiceIntervalClamped(p2); // Double check the service interval from the user-input
- if (serv_int != p2 || !IsValidVehicleID(p1)) return CMD_ERROR;
+ if (serv_int != p2 || !Vehicle::IsValidID(p1)) return CMD_ERROR;
Vehicle *v = Vehicle::Get(p1);