summaryrefslogtreecommitdiff
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
commit87d2c032556dfabba40445c7e29145e603760800 (patch)
tree8191eef27643b8de19afd0cd3eef37dd580b147a
parent8dcae588e82ffecff76b02c9a243c407dcb8d78c (diff)
downloadopenttd-87d2c032556dfabba40445c7e29145e603760800.tar.xz
(svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron)
-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);