format
This commit is contained in:
parent
5dc31252ef
commit
314bf51465
@ -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"};
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user