@@ -528,32 +528,32 @@ void collapseTurnAt(std::vector<RouteStep> &steps,
528
528
529
529
// check if the actual turn we wan't to announce is delayed. This situation describes a turn
530
530
// that is expressed by two turns,
531
- const auto isDelayedTurn = [](const RouteStep &openining_turn ,
531
+ const auto isDelayedTurn = [](const RouteStep &opening_turn ,
532
532
const RouteStep &finishing_turn) {
533
533
// only possible if both are compatible
534
- if (!compatible (openining_turn , finishing_turn))
534
+ if (!compatible (opening_turn , finishing_turn))
535
535
return false ;
536
536
else
537
537
{
538
538
const auto is_short_and_collapsable =
539
- openining_turn .distance <= MAX_COLLAPSE_DISTANCE &&
539
+ opening_turn .distance <= MAX_COLLAPSE_DISTANCE &&
540
540
isCollapsableInstruction (finishing_turn.maneuver .instruction );
541
541
542
- const auto without_choice = choiceless (finishing_turn, openining_turn );
542
+ const auto without_choice = choiceless (finishing_turn, opening_turn );
543
543
544
544
const auto is_not_too_long_and_choiceless =
545
- openining_turn .distance <= 2 * MAX_COLLAPSE_DISTANCE && without_choice;
545
+ opening_turn .distance <= 2 * MAX_COLLAPSE_DISTANCE && without_choice;
546
546
547
547
// for ramps we allow longer stretches, since they are often on some major brides/large
548
548
// roads. A combined distance of of 4 intersections would be to long for a normal
549
549
// collapse. In case of a ramp though, we also account for situations that have the ramp
550
550
// tagged late
551
551
const auto is_delayed_turn_onto_a_ramp =
552
- openining_turn .distance <= 4 * MAX_COLLAPSE_DISTANCE && without_choice &&
552
+ opening_turn .distance <= 4 * MAX_COLLAPSE_DISTANCE && without_choice &&
553
553
util::guidance::hasRampType (finishing_turn.maneuver .instruction );
554
- return !util::guidance::hasRampType (openining_turn .maneuver .instruction ) &&
554
+ return !util::guidance::hasRampType (opening_turn .maneuver .instruction ) &&
555
555
(is_short_and_collapsable || is_not_too_long_and_choiceless ||
556
- isLinkroad (openining_turn ) || is_delayed_turn_onto_a_ramp);
556
+ isLinkroad (opening_turn ) || is_delayed_turn_onto_a_ramp);
557
557
}
558
558
};
559
559
0 commit comments