From 512f1268d7a1f4c001b58043ece32db022a59a85 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 10 Jun 2021 16:49:17 +0200 Subject: [PATCH] JANITORIAL: Fix formatting --- engines/saga2/patrol.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/engines/saga2/patrol.cpp b/engines/saga2/patrol.cpp index d454a03700b..031088d2d7b 100644 --- a/engines/saga2/patrol.cpp +++ b/engines/saga2/patrol.cpp @@ -94,16 +94,11 @@ void PatrolRouteList::setRouteData(PatrolRouteData *data) { error("Cannot allocate patrol route list offset array."); // Iterate through each patrol route a compute its offset - for (i = 0, currentRoute = (PatrolRoute *)&routeData[1]; - i < noRoutes; - i++, - currentRoute = - (PatrolRoute *) & (*currentRoute)[currentRoute->vertices()]) { -#if DEBUG - assert(currentRoute->vertices() > 1); -#endif + for (i = 0, currentRoute = (PatrolRoute *)&routeData[1]; i < noRoutes; i++) { warning("STUB: PatrolRouteList::setRouteData: unsafe arithmetics"); offsetArray[i] = 0; // FIXME: It was "currentRoute - routeData"; + + currentRoute = (PatrolRoute *)&(*currentRoute)[currentRoute->vertices()]; } } @@ -191,8 +186,7 @@ void PatrolRouteIterator::altIncrement(void) { vertexNo++; - if (vertexNo >= route.vertices() - && (flags & patrolRouteRepeat)) { + if (vertexNo >= route.vertices() && (flags & patrolRouteRepeat)) { // If repeating, initialize for iteration in the standard // direction, and reset the waypoint index flags &= ~patrolRouteInAlternate; @@ -208,8 +202,7 @@ void PatrolRouteIterator::altDecrement(void) { vertexNo--; - if (vertexNo < 0 - && (flags & patrolRouteRepeat)) { + if (vertexNo < 0 && (flags & patrolRouteRepeat)) { // If repeating, initialize for iteration in the standard // direction, and reset the waypoint index flags &= ~patrolRouteInAlternate;