From 0d99b6c71cd096599b4805d230483f3e4e958af1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 24 May 2009 20:29:04 +0000 Subject: (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. --- src/vehicle_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicle_cmd.cpp') diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 658f00268..e2556e04c 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -152,7 +152,7 @@ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 if (!vehicle_list_window) { if (vehicle_type == VEH_TRAIN) { - if (CheckTrainInDepot((Train *)v, false) == -1) continue; + if (CheckTrainInDepot((const Train *)v, false) == -1) continue; } else { if (!(v->vehstatus & VS_HIDDEN)) continue; } @@ -229,7 +229,7 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 bool did_something = false; for (uint i = 0; i < list.Length(); i++) { - Vehicle *v = (Vehicle*)list[i]; + const Vehicle *v = list[i]; /* Ensure that the vehicle completely in the depot */ if (!v->IsInDepot()) continue; -- cgit v1.2.3-70-g09d2