Skip to content

Commit 857aa71

Browse files
authored
fix(autoware_path_smoother): fix bugprone-branch-clone (#9697)
* fix: bugprone-error Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * fix: bugprone-error Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> --------- Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent a88e90e commit 857aa71

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

planning/autoware_path_smoother/src/elastic_band.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ Eigen::SparseMatrix<double> makePMatrix(const int num_points)
5353
assign_value_to_triplet_vec(r, c, 6.0);
5454
}
5555
} else if (std::abs(c - r) == 1) {
56-
if (r == 0 || r == num_points - 1) {
57-
assign_value_to_triplet_vec(r, c, -2.0);
58-
} else if (c == 0 || c == num_points - 1) {
56+
if (r == 0 || r == num_points - 1 || c == 0 || c == num_points - 1) {
5957
assign_value_to_triplet_vec(r, c, -2.0);
6058
} else {
6159
assign_value_to_triplet_vec(r, c, -4.0);

0 commit comments

Comments
 (0)