Skip to content

Commit 0262ec2

Browse files
Fixed types
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
1 parent 092c350 commit 0262ec2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

localization/ndt_scan_matcher/test/test_util.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#ifndef TEST_UTIL_HPP_
1616
#define TEST_UTIL_HPP_
1717

18+
#include <pcl/point_cloud.h>
1819
#include <pcl/point_types.h>
1920

2021
pcl::PointCloud<pcl::PointXYZ> make_sample_pcd(
@@ -29,8 +30,8 @@ pcl::PointCloud<pcl::PointXYZ> make_sample_pcd(
2930
cloud.points.resize(cloud.width * cloud.height);
3031
for (int i = 0; i < num_points_per_line; ++i) {
3132
for (int j = 0; j < num_points_per_line; ++j) {
32-
const float x = min_xy + interval * j;
33-
const float y = min_xy + interval * i;
33+
const float x = min_xy + interval * static_cast<float>(j);
34+
const float y = min_xy + interval * static_cast<float>(i);
3435
const float z = std::hypot(x - center, y - center) / (range_width / 16);
3536
cloud.points[i * num_points_per_line + j].x = x;
3637
cloud.points[i * num_points_per_line + j].y = y;

0 commit comments

Comments
 (0)