Skip to content

Commit a88e90e

Browse files
authoredDec 20, 2024
fix(autoware_freespace_planning_algorithms): fix bugprone-errors (#9670)
* 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 0b2bbe8 commit a88e90e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎planning/autoware_freespace_planning_algorithms/src/abstract_algorithm.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void AbstractPlanningAlgorithm::setMap(const nav_msgs::msg::OccupancyGrid & cost
115115
std::vector<bool> is_obstacle_table;
116116
is_obstacle_table.resize(nb_of_cells);
117117
for (uint32_t i = 0; i < nb_of_cells; ++i) {
118-
const int cost = costmap_.data[i];
118+
const int cost = costmap_.data[i]; // NOLINT
119119
if (cost < 0 || planner_common_param_.obstacle_threshold <= cost) {
120120
is_obstacle_table[i] = true;
121121
}

‎planning/autoware_freespace_planning_algorithms/src/astar_search.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ double AstarSearch::getExpansionDistance(const AstarNode & current_node) const
388388
double AstarSearch::getSteeringCost(const int steering_index) const
389389
{
390390
return planner_common_param_.curve_weight *
391-
(abs(steering_index) / planner_common_param_.turning_steps);
391+
(static_cast<double>(abs(steering_index)) / planner_common_param_.turning_steps);
392392
}
393393

394394
double AstarSearch::getSteeringChangeCost(

0 commit comments

Comments
 (0)