From 2a3eaee333e6437743b9b9a352e91d51455f07c4 Mon Sep 17 00:00:00 2001 From: Koichi98 <45482193+Koichi98@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:37:23 +0900 Subject: [PATCH] fix(autoware_obstacle_cruise_planner): fix shadowVariable warning in generateSlowDownTrajectory (#7659) Signed-off-by: Koichi Imai --- .../src/planner_interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/planning/autoware_obstacle_cruise_planner/src/planner_interface.cpp b/planning/autoware_obstacle_cruise_planner/src/planner_interface.cpp index a3fe0948782a1..516bf5579b82c 100644 --- a/planning/autoware_obstacle_cruise_planner/src/planner_interface.cpp +++ b/planning/autoware_obstacle_cruise_planner/src/planner_interface.cpp @@ -623,9 +623,9 @@ std::vector PlannerInterface::generateSlowDownTrajectory( }(); // insert slow down velocity between slow start and end - for (size_t i = (slow_down_start_idx ? *slow_down_start_idx : 0); i <= *slow_down_end_idx; - ++i) { - auto & traj_point = slow_down_traj_points.at(i); + for (size_t j = (slow_down_start_idx ? *slow_down_start_idx : 0); j <= *slow_down_end_idx; + ++j) { + auto & traj_point = slow_down_traj_points.at(j); traj_point.longitudinal_velocity_mps = std::min(traj_point.longitudinal_velocity_mps, static_cast(stable_slow_down_vel)); }