summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-26 17:34:48 +0000
committertruelight <truelight@openttd.org>2006-08-26 17:34:48 +0000
commitb7ecdc85d8b9dd3dc0de61947a490df2fcbffea4 (patch)
tree8191eef27643b8de19afd0cd3eef37dd580b147a /waypoint.c
parent3b82b67391ee2068845c62cc373a00c7c2852b42 (diff)
downloadopenttd-b7ecdc85d8b9dd3dc0de61947a490df2fcbffea4.tar.xz
(svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron)
Diffstat (limited to 'waypoint.c')
-rw-r--r--waypoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/waypoint.c b/waypoint.c
index 4aeb72040..4dd2baf73 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -88,7 +88,6 @@ static void RedrawWaypointSign(const Waypoint* wp)
/* Update all signs */
void UpdateAllWaypointSigns(void)
{
- DestinationID dest;
Waypoint *wp;
FOR_ALL_WAYPOINTS(wp) {
@@ -99,6 +98,8 @@ void UpdateAllWaypointSigns(void)
/* Internal handler to delete a waypoint */
void DestroyWaypoint(Waypoint *wp)
{
+ DestinationID dest;
+
dest.waypoint = wp->index;
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, dest);