Skip to content

Commit 1d1b3ec

Browse files
committed
remove unnecessary loop
Signed-off-by: Mert Çolak <colak.mrt@outlook.com>
1 parent 7d50b6e commit 1d1b3ec

File tree

1 file changed

+2
-7
lines changed
  • planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src

1 file changed

+2
-7
lines changed

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/util.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -715,13 +715,8 @@ lanelet::Lanelet createDepartureCheckLanelet(
715715
lanelet::Points3d points;
716716
const auto & bound = left_side_parking ? (is_outer ? lane.leftBound() : lane.rightBound())
717717
: (is_outer ? lane.rightBound() : lane.leftBound());
718-
if (invert) {
719-
for (const auto & pt : bound.invert()) {
720-
points.push_back(lanelet::Point3d(pt));
721-
}
722-
return points;
723-
}
724-
for (const auto & pt : bound) {
718+
const auto ego_oriented_bound = invert ? bound.invert() : bound;
719+
for (const auto & pt : ego_oriented_bound) {
725720
points.push_back(lanelet::Point3d(pt));
726721
}
727722
return points;

0 commit comments

Comments
 (0)