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.
|
// translations of TurnTypes. Not all types are exposed to the outside world.
|
||||||
// invalid types should never be returned as part of the API
|
// invalid types should never be returned as part of the API
|
||||||
const constexpr char *turn_type_names[] = {"invalid",
|
const constexpr char *turn_type_names[] = {
|
||||||
"new name",
|
"invalid", "new name", "continue", "turn",
|
||||||
"continue",
|
"merge", "on ramp", "off ramp", "fork",
|
||||||
"turn",
|
"end of road", "notification", "roundabout", "exit roundabout",
|
||||||
"merge",
|
"rotary", "exit rotary", "roundabout turn", "roundabout turn",
|
||||||
"on ramp",
|
"use lane", "invalid", "invalid", "roundabout",
|
||||||
"off ramp",
|
"exit roundabout", "rotary", "exit rotary", "roundabout turn",
|
||||||
"fork",
|
"exit roundabout", "invalid", "invalid"};
|
||||||
"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"};
|
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)
|
// might be missing as well)
|
||||||
void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterator end)
|
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 we do not exit the roundabout, there is no exit to report. All good here
|
||||||
if (!leavesRoundabout(last->maneuver.instruction))
|
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
|
// 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 ||
|
if ((begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersection ||
|
||||||
begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersectionAtExit)
|
begin->maneuver.instruction.type == TurnType::EnterRoundaboutIntersectionAtExit) &&
|
||||||
&& begin->mode == last->mode )
|
begin->mode == last->mode)
|
||||||
{
|
{
|
||||||
compressRange(begin,end);
|
compressRange(begin, end);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user