This commit is contained in:
Moritz Kobitzsch 2017-08-02 12:45:46 +02:00 committed by Daniel Patterson
parent 5dc31252ef
commit 314bf51465
No known key found for this signature in database
GPG Key ID: 19C12BE1725A028B
2 changed files with 12 additions and 31 deletions

View File

@ -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"};

View File

@ -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
{