AP_Mission: remove pointless else clauses

This commit is contained in:
Peter Barker 2018-08-08 18:04:21 +10:00 committed by Randy Mackay
parent f65e37663a
commit 5cc4015144

View File

@ -300,15 +300,13 @@ bool AP_Mission::get_next_nav_cmd(uint16_t start_index, Mission_Command& cmd)
if (!get_next_cmd(cmd_index, cmd, false)) {
// no more commands so return failure
return false;
}else{
// if found a "navigation" command then return it
if (is_nav_cmd(cmd)) {
return true;
}else{
// move on in list
cmd_index++;
}
}
// if found a "navigation" command then return it
if (is_nav_cmd(cmd)) {
return true;
}
// move on in list
cmd_index++;
}
// if we got this far we did not find a navigation command