Skip to content

Commit

Permalink
remove redundant initialization
Browse files Browse the repository at this point in the history
Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc committed May 12, 2024
1 parent 021129a commit 0eb34eb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ Polygon2d NoStoppingAreaModule::generateEgoNoStoppingAreaLanePolygon(

const int num_ignore_nearest = 1; // Do not consider nearest lane polygon
size_t ego_area_start_idx = closest_idx + num_ignore_nearest;
size_t ego_area_end_idx = ego_area_start_idx;
// return if area size is not intentional
if (no_stopping_area_reg_elem_.noStoppingAreas().size() != 1) {
return ego_area;
Expand All @@ -326,7 +325,7 @@ Polygon2d NoStoppingAreaModule::generateEgoNoStoppingAreaLanePolygon(
}
double dist_from_area_sum = 0.0;
// decide end idx with extract distance
ego_area_end_idx = ego_area_start_idx;
size_t ego_area_end_idx = ego_area_start_idx;
for (size_t i = ego_area_start_idx; i < pp.size() - 1; ++i) {
dist_from_start_sum += tier4_autoware_utils::calcDistance2d(pp.at(i), pp.at(i - 1));
const auto & p = pp.at(i).point.pose.position;
Expand Down

0 comments on commit 0eb34eb

Please sign in to comment.