Skip to content

Commit

Permalink
fix(autoware_path_smoother): fix bugprone-branch-clone (#9697)
Browse files Browse the repository at this point in the history
* fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>

* fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>

---------

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Dec 20, 2024
1 parent a88e90e commit 857aa71
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions planning/autoware_path_smoother/src/elastic_band.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ Eigen::SparseMatrix<double> makePMatrix(const int num_points)
assign_value_to_triplet_vec(r, c, 6.0);
}
} else if (std::abs(c - r) == 1) {
if (r == 0 || r == num_points - 1) {
assign_value_to_triplet_vec(r, c, -2.0);
} else if (c == 0 || c == num_points - 1) {
if (r == 0 || r == num_points - 1 || c == 0 || c == num_points - 1) {
assign_value_to_triplet_vec(r, c, -2.0);
} else {
assign_value_to_triplet_vec(r, c, -4.0);
Expand Down

0 comments on commit 857aa71

Please sign in to comment.