From 8319a96aedc6e4d40d510d54de79f1ea0f02f151 Mon Sep 17 00:00:00 2001 From: Moritz Kobitzsch Date: Mon, 31 Jul 2017 14:49:35 +0200 Subject: [PATCH] format --- include/engine/api/route_api.hpp | 3 ++- src/engine/api/json_factory.cpp | 35 +++++++++++++++++++------ src/engine/guidance/post_processing.cpp | 2 +- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/include/engine/api/route_api.hpp b/include/engine/api/route_api.hpp index 47b63e1af..dee9e68c5 100644 --- a/include/engine/api/route_api.hpp +++ b/include/engine/api/route_api.hpp @@ -167,7 +167,8 @@ class RouteAPI : public BaseAPI * the overall response consistent. * * ⚠ CAUTION: order of post-processing steps is important - * - handleRoundabouts must be called before collapseTurnInstructions that expects + * - handleRoundabouts must be called before collapseTurnInstructions that + *expects * post-processed roundabouts without Exit instructions */ diff --git a/src/engine/api/json_factory.cpp b/src/engine/api/json_factory.cpp index dc4d0d03b..b5e2f87d3 100644 --- a/src/engine/api/json_factory.cpp +++ b/src/engine/api/json_factory.cpp @@ -43,14 +43,33 @@ 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", "roundabout and exit", - "rotary", "rotary and exit", "roundabout turn", "roundabout turn and exit", - "use lane", "invalid", "invalid", "roundabout", "exit roundabout", - "rotary", "exit rotary", "roundabout turn", "exit roundabout turn", - "invalid", "invalid"}; +const constexpr char *turn_type_names[] = {"invalid", + "new name", + "continue", + "turn", + "merge", + "on ramp", + "off ramp", + "fork", + "end of road", + "notification", + "roundabout", + "roundabout and exit", + "rotary", + "rotary and exit", + "roundabout turn", + "roundabout turn and exit", + "use lane", + "invalid", + "invalid", + "roundabout", + "exit roundabout", + "rotary", + "exit rotary", + "roundabout turn", + "exit roundabout turn", + "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 cf6cc175c..c0b4844f9 100644 --- a/src/engine/guidance/post_processing.cpp +++ b/src/engine/guidance/post_processing.cpp @@ -96,7 +96,7 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat const auto exit = std::count_if(begin, end, passes_exit_or_leaves_roundabout); // removes all intermediate instructions, assigns names and exit numbers - BOOST_ASSERT(leavesRoundabout((end-1)->maneuver.instruction)); + BOOST_ASSERT(leavesRoundabout((end - 1)->maneuver.instruction)); BOOST_ASSERT(std::distance(begin, end) >= 1); (end - 1)->maneuver.exit = exit;