Skip to content

Commit

Permalink
perf(behavior_path_dynamic_avoidance_module): use const reference (#6981
Browse files Browse the repository at this point in the history
)

* perf(behavior_path_dynamic_avoidance_module): use const reference

Signed-off-by: Ryuta Kambe <[email protected]>

* style(pre-commit): autofix

* add const to the other args

---------

Signed-off-by: Ryuta Kambe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yuki TAKAGI <[email protected]>
  • Loading branch information
3 people authored May 14, 2024
1 parent f30c035 commit 2ae1716
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1799,11 +1799,11 @@ DynamicAvoidanceModule::EgoPathReservePoly DynamicAvoidanceModule::calcEgoPathRe
ego_path_lines.push_back(tier4_autoware_utils::fromMsg(path_point.point.pose.position).to_2d());
}

auto calcReservePoly =
[&ego_path_lines](
strategy::distance_asymmetric<double> path_expand_strategy,
strategy::distance_asymmetric<double> steer_expand_strategy,
std::vector<geometry_msgs::msg::Point> outer_body_path) -> tier4_autoware_utils::Polygon2d {
auto calcReservePoly = [&ego_path_lines](
const strategy::distance_asymmetric<double> path_expand_strategy,
const strategy::distance_asymmetric<double> steer_expand_strategy,
const std::vector<geometry_msgs::msg::Point> & outer_body_path)
-> tier4_autoware_utils::Polygon2d {
// reserve area based on the reference path
tier4_autoware_utils::MultiPolygon2d path_poly;
boost::geometry::buffer(
Expand Down

0 comments on commit 2ae1716

Please sign in to comment.