}
insertWayptsAtIndex(wps, index);
- return legAtIndex(aIndex);
+ return legAtIndex(index);
}
void FlightPlan::insertWayptsAtIndex(const WayptVec& wps, int aIndex)
FlightPlan::Leg* FlightPlan::previousLeg() const
{
- if (_currentIndex == 0) {
+ if (_currentIndex <= 0) {
return NULL;
}