Skip to content

Commit

Permalink
refactor(mission_planner): remove redundant is_reroute check (#6980)
Browse files Browse the repository at this point in the history
remove redundant is_reroute check

Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored May 11, 2024
1 parent c24ad46 commit 8176c63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void MissionPlanner::on_set_lanelet_route(

if (is_reroute && !check_reroute_safety(*current_route_, route)) {
cancel_route();
change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
change_state(RouteState::SET);
throw service_utils::ServiceException(
ResponseCode::ERROR_REROUTE_FAILED, "New route is not safe. Reroute failed.");
}
Expand Down Expand Up @@ -298,7 +298,7 @@ void MissionPlanner::on_set_waypoint_route(

if (is_reroute && !check_reroute_safety(*current_route_, route)) {
cancel_route();
change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
change_state(RouteState::SET);
throw service_utils::ServiceException(
ResponseCode::ERROR_REROUTE_FAILED, "New route is not safe. Reroute failed.");
}
Expand Down

0 comments on commit 8176c63

Please sign in to comment.