changeset 4395:38382c391681 draft

(svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron)
author truelight <truelight@openttd.org>
date Sat, 26 Aug 2006 17:34:48 +0000
parents b150f6a9d358
children 2238f338aed8
files waypoint.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/waypoint.c
+++ b/waypoint.c
@@ -88,7 +88,6 @@
 /* Update all signs */
 void UpdateAllWaypointSigns(void)
 {
-	DestinationID dest;
 	Waypoint *wp;
 
 	FOR_ALL_WAYPOINTS(wp) {
@@ -99,6 +98,8 @@
 /* Internal handler to delete a waypoint */
 void DestroyWaypoint(Waypoint *wp)
 {
+	DestinationID dest;
+
 	dest.waypoint = wp->index;
 	RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, dest);