fix broken assertion
This commit is contained in:
parent
311b348d09
commit
6265b8fa77
@ -64,7 +64,6 @@ std::vector<RouteStep> anticipateLaneChange(std::vector<RouteStep> steps)
|
|||||||
const auto current_lanes = current.maneuver.lanes;
|
const auto current_lanes = current.maneuver.lanes;
|
||||||
|
|
||||||
// Constrain the previous turn's lanes
|
// Constrain the previous turn's lanes
|
||||||
auto &previous_inst = previous.maneuver.instruction;
|
|
||||||
auto &previous_lanes = previous.maneuver.lanes;
|
auto &previous_lanes = previous.maneuver.lanes;
|
||||||
// Lane mapping (N:M) from previous lanes (N) to current lanes (M), with:
|
// Lane mapping (N:M) from previous lanes (N) to current lanes (M), with:
|
||||||
// N > M, N > 1 fan-in situation, constrain N lanes to min(N,M) shared lanes
|
// N > M, N > 1 fan-in situation, constrain N lanes to min(N,M) shared lanes
|
||||||
|
@ -1082,7 +1082,7 @@ std::vector<RouteStep> buildIntersections(std::vector<RouteStep> steps)
|
|||||||
// previous instruction.
|
// previous instruction.
|
||||||
if (instruction.type == TurnType::EndOfRoad)
|
if (instruction.type == TurnType::EndOfRoad)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(step_index > 0 && step_index < step_index + 1 < steps.size());
|
BOOST_ASSERT(step_index > 0 && step_index + 1 < steps.size());
|
||||||
const auto &previous_step = steps[last_valid_instruction];
|
const auto &previous_step = steps[last_valid_instruction];
|
||||||
if (previous_step.intersections.size() < MIN_END_OF_ROAD_INTERSECTIONS)
|
if (previous_step.intersections.size() < MIN_END_OF_ROAD_INTERSECTIONS)
|
||||||
step.maneuver.instruction.type = TurnType::Turn;
|
step.maneuver.instruction.type = TurnType::Turn;
|
||||||
|
Loading…
Reference in New Issue
Block a user