summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-05-14 15:34:04 +0000
committerpeter1138 <peter1138@openttd.org>2008-05-14 15:34:04 +0000
commit6bfd695002a02ca1bcf0f4a083733c3f256b98a7 (patch)
tree2963a46d29e8d02cb63e24e2c64a33e8b38d99f5 /src
parentf64c4fc4fbf9ca976074647a8d259143e9355096 (diff)
downloadopenttd-6bfd695002a02ca1bcf0f4a083733c3f256b98a7.tar.xz
(svn r13087) -Codechange: Constify CalcPercentVehicleFilled() (michi_cc)
Diffstat (limited to 'src')
-rw-r--r--src/vehicle.cpp2
-rw-r--r--src/vehicle_func.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 85e0b9762..baf5a6dfa 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1552,7 +1552,7 @@ CommandCost SendAllVehiclesToDepot(VehicleType type, uint32 flags, bool service,
* @param color The string to show depending on if we are unloading or loading
* @return A percentage of how full the Vehicle is.
*/
-uint8 CalcPercentVehicleFilled(Vehicle *v, StringID *color)
+uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color)
{
int count = 0;
int max = 0;
diff --git a/src/vehicle_func.h b/src/vehicle_func.h
index 61ddc7e51..9e5dceba5 100644
--- a/src/vehicle_func.h
+++ b/src/vehicle_func.h
@@ -31,7 +31,7 @@ void *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc);
void *VehicleFromPosXY(int x, int y, void *data, VehicleFromPosProc *proc);
void CallVehicleTicks();
Vehicle *FindVehicleOnTileZ(TileIndex tile, byte z);
-uint8 CalcPercentVehicleFilled(Vehicle *v, StringID *color);
+uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color);
void InitializeTrains();
byte VehicleRandomBits();