Mercurial > hg > openttd
changeset 9221:9a9e2d4fa821 draft
(svn r13087) -Codechange: Constify CalcPercentVehicleFilled() (michi_cc)
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Wed, 14 May 2008 15:34:04 +0000 |
parents | baa148485404 |
children | 6ad7fc7fbcaf |
files | src/vehicle.cpp src/vehicle_func.h |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1552,7 +1552,7 @@ * @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;
--- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -31,7 +31,7 @@ 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();