Does Controller::findPositionOnPlan()
do what is intended?
#142
Labels
question
Further information is requested
Controller::findPositionOnPlan()
do what is intended?
#142
While refactoring
Controller::findPositionOnPlan()
, I noticed the following. I'm not sure if it is intended or not so I would like some feedback. Depending on the feedback we can determine what to do (nothing, document, fix, etc).In that function we look ahead in the plan based on a given index. As long as each next point is a better match, we keep looking and update the given index. Once we're done with looking ahead, we start looking backward. Now one of two things will happen:
So in practice we look either forward or backward but never both. Is this intended?
I've included the code below and stripped the bits that were less relevant:
The text was updated successfully, but these errors were encountered: