Skip to content

Commit 95aef0d

Browse files
authored
fix(autoware_path_sampler): fix passedByValue (autowarefoundation#8216)
fix:passedByValue Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent c4aea4b commit 95aef0d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

planning/sampling_based_planner/autoware_path_sampler/include/autoware_path_sampler/utils/trajectory_utils.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ size_t findEgoSegmentIndex(
140140
}
141141

142142
std::vector<TrajectoryPoint> resampleTrajectoryPoints(
143-
const std::vector<TrajectoryPoint> traj_points, const double interval);
143+
const std::vector<TrajectoryPoint> & traj_points, const double interval);
144144

145145
std::vector<TrajectoryPoint> resampleTrajectoryPointsWithoutStopPoint(
146-
const std::vector<TrajectoryPoint> traj_points, const double interval);
146+
const std::vector<TrajectoryPoint> & traj_points, const double interval);
147147

148148
template <typename T>
149149
std::optional<size_t> updateFrontPointForFix(

planning/sampling_based_planner/autoware_path_sampler/src/utils/trajectory_utils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void compensateLastPose(
5959
}
6060

6161
std::vector<TrajectoryPoint> resampleTrajectoryPoints(
62-
const std::vector<TrajectoryPoint> traj_points, const double interval)
62+
const std::vector<TrajectoryPoint> & traj_points, const double interval)
6363
{
6464
constexpr bool enable_resampling_stop_point = true;
6565

@@ -71,7 +71,7 @@ std::vector<TrajectoryPoint> resampleTrajectoryPoints(
7171

7272
// NOTE: stop point will not be resampled
7373
std::vector<TrajectoryPoint> resampleTrajectoryPointsWithoutStopPoint(
74-
const std::vector<TrajectoryPoint> traj_points, const double interval)
74+
const std::vector<TrajectoryPoint> & traj_points, const double interval)
7575
{
7676
constexpr bool enable_resampling_stop_point = false;
7777

0 commit comments

Comments
 (0)