]> err.no Git - mapper/commitdiff
Formating
authorKaj-Michael Lang <milang@angel.tal.org>
Fri, 10 Aug 2007 12:43:33 +0000 (15:43 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Fri, 10 Aug 2007 12:43:33 +0000 (15:43 +0300)
src/route.c

index e33920d39d285d1a85e97b50c8f852721e406112..6247d3d89383000650911bc7a9404d5bf69878b4 100644 (file)
@@ -522,8 +522,7 @@ find_nearest_waypoint(guint unitx, guint unity)
                nearest_squared = DISTANCE_SQUARED(pos, *(wcurr->point));
 
                while (wcurr++ != _route.wtail) {
-                       guint64 test_squared =
-                           DISTANCE_SQUARED(pos, *(wcurr->point));
+                       guint64 test_squared = DISTANCE_SQUARED(pos, *(wcurr->point));
                        if (test_squared < nearest_squared) {
                                wnear = wcurr;
                                nearest_squared = test_squared;
@@ -602,11 +601,8 @@ route_update_nears(gboolean quick)
                             * should skip it.  Note that if there is no _next_wpt, then
                             * there is no next waypoint, so we do not skip it in that case. */
                            || (wcurr->point == near && quick
-                               && (_next_wpt
-                                   && (DISTANCE_SQUARED(_pos, *near) >
-                                       _next_way_dist_squared
-                                       && DISTANCE_SQUARED(_pos, *_next_wpt)
-                                       < _next_wpt_dist_squared))))
+                               && (_next_wpt && (DISTANCE_SQUARED(_pos, *near) > _next_way_dist_squared
+                                       && DISTANCE_SQUARED(_pos, *_next_wpt) < _next_wpt_dist_squared))))
                                wnext = wcurr + 1;
                        else
                                break;
@@ -614,16 +610,8 @@ route_update_nears(gboolean quick)
 
                if (wnext == _route.wtail && (wnext->point < near
                                              || (wnext->point == near && quick
-                                                 && (_next_wpt
-                                                     &&
-                                                     (DISTANCE_SQUARED
-                                                      (_pos,
-                                                       *near) >
-                                                      _next_way_dist_squared
-                                                      && DISTANCE_SQUARED(_pos,
-                                                                          *_next_wpt)
-                                                      <
-                                                      _next_wpt_dist_squared)))))
+                                                 && (_next_wpt && (DISTANCE_SQUARED (_pos, *near) > _next_way_dist_squared
+                                                      && DISTANCE_SQUARED(_pos, *_next_wpt) < _next_wpt_dist_squared)))))
                {
                        _next_way = NULL;
                        _next_wpt = NULL;
@@ -649,8 +637,7 @@ route_update_nears(gboolean quick)
                                }
                                ret = TRUE;
                        }
-                       _next_way_dist_squared =
-                           DISTANCE_SQUARED(_pos, *wnext->point);
+                       _next_way_dist_squared = DISTANCE_SQUARED(_pos, *wnext->point);
                        if (_next_wpt)
                                _next_wpt_dist_squared =
                                    DISTANCE_SQUARED(_pos, *_next_wpt);