format
This commit is contained in:
parent
28ddd983b3
commit
8319a96aed
@ -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
|
||||
*/
|
||||
|
||||
|
@ -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"};
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user