summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-10-20 19:55:09 +0000
committerfrosch <frosch@openttd.org>2009-10-20 19:55:09 +0000
commit8df61c0fc0b36ea07391171b8a14908fdea0dd1a (patch)
treeeaa430072aff8d9963a10e28e4b6d1179c3be5c6
parent30ebe379c768a2d2bd060d6bf4fb82d7f609df3f (diff)
downloadopenttd-8df61c0fc0b36ea07391171b8a14908fdea0dd1a.tar.xz
(svn r17826) -Codechange: GetRoadVehLength() is only used in one file, make it static.
-rw-r--r--src/roadveh.h2
-rw-r--r--src/roadveh_cmd.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/roadveh.h b/src/roadveh.h
index 44062a3eb..ffcc953ed 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -82,8 +82,6 @@ enum RoadVehicleSubType {
void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2);
-byte GetRoadVehLength(const RoadVehicle *v);
-
void RoadVehUpdateCache(RoadVehicle *v);
/** Cached oftenly queried (NewGRF) values */
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index dc2683cb8..1a63c06e4 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -144,9 +144,9 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, SpriteID pal)
DrawSprite(GetRoadVehIcon(engine), pal, x, y);
}
-byte GetRoadVehLength(const RoadVehicle *v)
+static uint GetRoadVehLength(const RoadVehicle *v)
{
- byte length = 8;
+ uint length = 8;
uint16 veh_len = GetVehicleCallback(CBID_VEHICLE_LENGTH, 0, 0, v->engine_type, v);
if (veh_len != CALLBACK_FAILED) {