Skip to content

Commit a5e827e

Browse files
add alias for inner lambda
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
1 parent b6b94b5 commit a5e827e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

planning/behavior_path_planner_common/include/behavior_path_planner_common/turn_signal_decider.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,16 @@ class TurnSignalDecider
234234
return std::any_of(start_itr, end_itr, [&footprint, &lanes](const auto & point) {
235235
const auto transform = pose2transform(point.point.pose);
236236
const auto shifted_vehicle_footprint = transformVector(footprint, transform);
237-
return std::any_of(
238-
lanes.begin(), lanes.end(), [&shifted_vehicle_footprint](const auto & lane) {
237+
238+
auto check_for_vehicle_and_bound_intersection =
239+
[&shifted_vehicle_footprint](const auto & lane) {
239240
const auto & left_bound = lane.leftBound2d().basicLineString();
240241
const auto & right_bound = lane.rightBound2d().basicLineString();
241242
return intersects(left_bound, shifted_vehicle_footprint) ||
242243
intersects(right_bound, shifted_vehicle_footprint);
243-
});
244+
};
245+
246+
return std::any_of(lanes.begin(), lanes.end(), check_for_vehicle_and_bound_intersection);
244247
});
245248
};
246249

0 commit comments

Comments
 (0)