Skip to content

Commit 142795a

Browse files
authored
fix(autoware_pointcloud_preprocessor): fix variableScope (autowarefoundation#8447)
* fix:variableScope Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * refactor:use const Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> --------- Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent 73127b7 commit 142795a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,12 @@ void DistortionCorrector<T>::undistortPointCloud(
217217
// If there is a point in a pointcloud that cannot be associated, record it to issue a warning
218218
bool is_twist_time_stamp_too_late = false;
219219
bool is_imu_time_stamp_too_late = false;
220-
double global_point_stamp;
221220

222221
for (; it_x != it_x.end(); ++it_x, ++it_y, ++it_z, ++it_time_stamp) {
223222
bool is_twist_valid = true;
224223
bool is_imu_valid = true;
225224

226-
global_point_stamp =
225+
const double global_point_stamp =
227226
pointcloud.header.stamp.sec + 1e-9 * (pointcloud.header.stamp.nanosec + *it_time_stamp);
228227

229228
// Get closest twist information

0 commit comments

Comments
 (0)