Skip to content

Commit

Permalink
fix(autoware_behavior_velocity_intersection_module): fix bugprone-bra…
Browse files Browse the repository at this point in the history
…nch-clone (#9702)

fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Dec 27, 2024
1 parent 2035873 commit 869cf4c
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,7 @@ DecisionResult IntersectionModule::modifyPathVelocityDetail(PathWithLaneId * pat
(std::fabs(dist_stopline) < planner_param_.common.stopline_overshoot_margin);
const bool over_stopline = (dist_stopline < 0.0);
const bool is_stopped_duration = planner_data_->isVehicleStopped(duration);
if (over_stopline) {
state_machine.setState(StateMachine::State::GO);
} else if (is_stopped_duration && approached_dist_stopline) {
if (over_stopline || (is_stopped_duration && approached_dist_stopline)) {
state_machine.setState(StateMachine::State::GO);
}
return state_machine.getState() == StateMachine::State::GO;
Expand All @@ -367,12 +365,7 @@ DecisionResult IntersectionModule::modifyPathVelocityDetail(PathWithLaneId * pat
(std::fabs(dist_stopline) < planner_param_.common.stopline_overshoot_margin);
const bool over_stopline = (dist_stopline < -planner_param_.common.stopline_overshoot_margin);
const bool is_stopped = planner_data_->isVehicleStopped(duration);
if (over_stopline) {
return true;
} else if (is_stopped && approached_dist_stopline) {
return true;
}
return false;
return over_stopline || (is_stopped && approached_dist_stopline);
};

const auto occlusion_wo_tl_pass_judge_line_idx =
Expand Down

0 comments on commit 869cf4c

Please sign in to comment.