(svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron)
authortruelight
Sat, 26 Aug 2006 17:34:48 +0000
changeset 4395 1c0dfdac7108
parent 4394 e291693358d0
child 4396 28cfaf264db6
(svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron)
waypoint.c
--- a/waypoint.c	Sat Aug 26 17:31:57 2006 +0000
+++ b/waypoint.c	Sat Aug 26 17:34:48 2006 +0000
@@ -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);