[skip ci] Add comments about order of post-processing calls
This commit is contained in:
parent
dd009322de
commit
d262c4dfaa
@ -165,6 +165,10 @@ class RouteAPI : public BaseAPI
|
|||||||
* to find a via point.
|
* to find a via point.
|
||||||
* The same exit will be emitted, though, if we should start routing at S, making
|
* The same exit will be emitted, though, if we should start routing at S, making
|
||||||
* the overall response consistent.
|
* the overall response consistent.
|
||||||
|
*
|
||||||
|
* ⚠ CAUTION: order of post-processing steps is important
|
||||||
|
* - postProcess must be called before collapseTurnInstructions that expects
|
||||||
|
* post-processed roundabouts without Exit instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
guidance::trimShortSegments(steps, leg_geometry);
|
guidance::trimShortSegments(steps, leg_geometry);
|
||||||
|
@ -315,6 +315,12 @@ RouteSteps collapseTurnInstructions(RouteSteps steps)
|
|||||||
if (entersRoundabout(current_step->maneuver.instruction) ||
|
if (entersRoundabout(current_step->maneuver.instruction) ||
|
||||||
staysOnRoundabout(current_step->maneuver.instruction))
|
staysOnRoundabout(current_step->maneuver.instruction))
|
||||||
{
|
{
|
||||||
|
// If postProcess is called before then all corresponding leavesRoundabout steps are
|
||||||
|
// removed and the current roundabout step can be ignored by directly proceeding to
|
||||||
|
// the next step.
|
||||||
|
// If postProcess is not called before then all steps till the next leavesRoundabout
|
||||||
|
// step must be skipped to prevent incorrect roundabouts post-processing.
|
||||||
|
|
||||||
// are we done for good?
|
// are we done for good?
|
||||||
if (current_step + 1 == steps.end())
|
if (current_step + 1 == steps.end())
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user