summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-08-31 15:28:11 +0000
committerDarkvater <Darkvater@openttd.org>2006-08-31 15:28:11 +0000
commit7c3262677147a5408f6088be0a80831fe3b2fb67 (patch)
treef17baf1663d48eb02e6e4dcae57f2f046b3e8342 /vehicle.h
parentfae6a74e71ee625a7e5dc0c693125e2671cfba53 (diff)
downloadopenttd-7c3262677147a5408f6088be0a80831fe3b2fb67.tar.xz
(svn r6279) -Codechange (r1525): Use proper const pointers for functions that do not change them .
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/vehicle.h b/vehicle.h
index 683e7acd1..b9226db78 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -426,11 +426,10 @@ static inline Order *GetLastVehicleOrder(const Vehicle *v)
}
/* Get the first vehicle of a shared-list, so we only have to walk forwards */
-static inline Vehicle *GetFirstVehicleFromSharedList(Vehicle *v)
+static inline Vehicle *GetFirstVehicleFromSharedList(const Vehicle *v)
{
- Vehicle *u = v;
- while (u->prev_shared != NULL)
- u = u->prev_shared;
+ Vehicle *u = (Vehicle *)v;
+ while (u->prev_shared != NULL) u = u->prev_shared;
return u;
}
@@ -462,8 +461,7 @@ PalSpriteID GetVehiclePalette(const Vehicle *v);
* Best is to have a virtual value for it when it needs to change again */
#define STATUS_BAR 5
-#define CMD_SEND_TO_DEPOT(x) _send_to_depot_proc_table[ x - VEH_Train]
-
extern const uint32 _send_to_depot_proc_table[];
+#define CMD_SEND_TO_DEPOT(x) _send_to_depot_proc_table[ x - VEH_Train]
#endif /* VEHICLE_H */