Skip to content

Commit 0eb34eb

Browse files
committed
remove redundant initialization
Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
1 parent 021129a commit 0eb34eb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

planning/behavior_velocity_no_stopping_area_module/src/scene_no_stopping_area.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ Polygon2d NoStoppingAreaModule::generateEgoNoStoppingAreaLanePolygon(
302302

303303
const int num_ignore_nearest = 1; // Do not consider nearest lane polygon
304304
size_t ego_area_start_idx = closest_idx + num_ignore_nearest;
305-
size_t ego_area_end_idx = ego_area_start_idx;
306305
// return if area size is not intentional
307306
if (no_stopping_area_reg_elem_.noStoppingAreas().size() != 1) {
308307
return ego_area;
@@ -326,7 +325,7 @@ Polygon2d NoStoppingAreaModule::generateEgoNoStoppingAreaLanePolygon(
326325
}
327326
double dist_from_area_sum = 0.0;
328327
// decide end idx with extract distance
329-
ego_area_end_idx = ego_area_start_idx;
328+
size_t ego_area_end_idx = ego_area_start_idx;
330329
for (size_t i = ego_area_start_idx; i < pp.size() - 1; ++i) {
331330
dist_from_start_sum += tier4_autoware_utils::calcDistance2d(pp.at(i), pp.at(i - 1));
332331
const auto & p = pp.at(i).point.pose.position;

0 commit comments

Comments
 (0)