From 314bf514653ead5e71b71b8adca6f0e2332a13d0 Mon Sep 17 00:00:00 2001 From: Moritz Kobitzsch Date: Wed, 2 Aug 2017 12:45:46 +0200 Subject: [PATCH] format --- src/engine/api/json_factory.cpp | 35 ++++++------------------- src/engine/guidance/post_processing.cpp | 8 +++--- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/engine/api/json_factory.cpp b/src/engine/api/json_factory.cpp index 994205cd4..c3770365e 100644 --- a/src/engine/api/json_factory.cpp +++ b/src/engine/api/json_factory.cpp @@ -43,33 +43,14 @@ const constexpr char *modifier_names[] = {"uturn", // translations of TurnTypes. Not all types are exposed to the outside world. // invalid types should never be returned as part of the API -const constexpr char *turn_type_names[] = {"invalid", - "new name", - "continue", - "turn", - "merge", - "on ramp", - "off ramp", - "fork", - "end of road", - "notification", - "roundabout", - "exit roundabout", - "rotary", - "exit rotary", - "roundabout turn", - "roundabout turn", - "use lane", - "invalid", - "invalid", - "roundabout", - "exit roundabout", - "rotary", - "exit rotary", - "roundabout turn", - "exit roundabout", - "invalid", - "invalid"}; +const constexpr char *turn_type_names[] = { + "invalid", "new name", "continue", "turn", + "merge", "on ramp", "off ramp", "fork", + "end of road", "notification", "roundabout", "exit roundabout", + "rotary", "exit rotary", "roundabout turn", "roundabout turn", + "use lane", "invalid", "invalid", "roundabout", + "exit roundabout", "rotary", "exit rotary", "roundabout turn", + "exit roundabout", "invalid", "invalid"}; const constexpr char *waypoint_type_names[] = {"invalid", "arrive", "depart"}; diff --git a/src/engine/guidance/post_processing.cpp b/src/engine/guidance/post_processing.cpp index 740267784..b2b5249eb 100644 --- a/src/engine/guidance/post_processing.cpp +++ b/src/engine/guidance/post_processing.cpp @@ -63,7 +63,7 @@ void compressRange(const RouteStepIterator begin, const RouteStepIterator end) // might be missing as well) void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterator end) { - auto const last = end-1; + auto const last = end - 1; // If we do not exit the roundabout, there is no exit to report. All good here if (!leavesRoundabout(last->maneuver.instruction)) { @@ -137,10 +137,10 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat // in case of a roundabout turn, we do not emit an exit as long as the mode remains the same if ((begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersection || - begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersectionAtExit) - && begin->mode == last->mode ) + begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersectionAtExit) && + begin->mode == last->mode) { - compressRange(begin,end); + compressRange(begin, end); } else {