Skip to content

Commit 04c927c

Browse files
committed
remove redundant is_reroute check
Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
1 parent c24ad46 commit 04c927c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

planning/mission_planner/src/mission_planner/mission_planner.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ void MissionPlanner::on_set_lanelet_route(
250250

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

299299
if (is_reroute && !check_reroute_safety(*current_route_, route)) {
300300
cancel_route();
301-
change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
301+
change_state(RouteState::SET);
302302
throw service_utils::ServiceException(
303303
ResponseCode::ERROR_REROUTE_FAILED, "New route is not safe. Reroute failed.");
304304
}

0 commit comments

Comments
 (0)