remove usage of use-lane completely

This commit is contained in:
Moritz Kobitzsch
2017-07-14 12:07:18 +02:00
parent 7b755d6f8b
commit f2f00b99e0
11 changed files with 23 additions and 36 deletions
+4 -3
View File
@@ -96,7 +96,7 @@ std::vector<RouteStep> anticipateLaneChange(std::vector<RouteStep> steps,
// only prevent use lanes due to making all turns. don't make turns during curvy
// segments
if (previous_inst.type == TurnType::UseLane)
if (previous_inst.type == TurnType::Suppressed)
time_to_constrained += previous.duration;
else
time_to_constrained = 0;
@@ -193,8 +193,9 @@ std::vector<RouteStep> anticipateLaneChange(std::vector<RouteStep> steps,
anticipate_for_right_turn();
}
if (previous_inst.type == TurnType::UseLane && current_inst.type == TurnType::UseLane &&
previous.mode == current.mode && previous_lanes == current_lanes)
if (previous_inst.type == TurnType::Suppressed &&
current_inst.type == TurnType::Suppressed && previous.mode == current.mode &&
previous_lanes == current_lanes)
{
previous.ElongateBy(current);
current.Invalidate();
+2 -3
View File
@@ -133,8 +133,7 @@ void closeOffRoundabout(const bool on_roundabout,
BOOST_ASSERT(leavesRoundabout(steps[1].maneuver.instruction) ||
steps[1].maneuver.instruction.type == TurnType::StayOnRoundabout ||
steps[1].maneuver.instruction.type == TurnType::Suppressed ||
steps[1].maneuver.instruction.type == TurnType::NoTurn ||
steps[1].maneuver.instruction.type == TurnType::UseLane);
steps[1].maneuver.instruction.type == TurnType::NoTurn);
steps[0].geometry_end = 1;
steps[1].geometry_begin = 0;
steps[1].AddInFront(steps[0]);
@@ -608,7 +607,7 @@ std::vector<RouteStep> buildIntersections(std::vector<RouteStep> steps)
{
auto &step = steps[step_index];
const auto instruction = step.maneuver.instruction;
if (instruction.type == TurnType::Suppressed || instruction.type == TurnType::UseLane)
if (instruction.type == TurnType::Suppressed)
{
BOOST_ASSERT(steps[last_valid_instruction].mode == step.mode);
// count intersections. We cannot use exit, since intersections can follow directly