Skip to content

Commit ad6a0a4

Browse files
committed
Enabled -DBUILD_surface_on_nurbs=ON in clang-tidy GitHub action
1 parent 771fe4a commit ad6a0a4

File tree

177 files changed

+618
-679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+618
-679
lines changed

.github/workflows/clang-tidy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang-18 -DCMAKE_C_COMPILER=/usr/bin/clang-18 . \
1818
-DBUILD_benchmarks=ON \
1919
-DBUILD_examples=ON \
20+
-DBUILD_surface_on_nurbs=ON \
2021
-DBUILD_simulation=ON \
2122
-DBUILD_global_tests=ON
2223

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/source.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Model {
5151
if (resolution <= 0)
5252
return assembled_;
5353

54-
typename std::map<float, PointTPtrConst>::iterator it =
54+
auto it =
5555
voxelized_assembled_.find(resolution);
5656
if (it == voxelized_assembled_.end()) {
5757
PointTPtr voxelized(new pcl::PointCloud<PointT>);

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_crh.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ pcl::rec_3d_framework::GlobalNNCRHRecognizer<Distance, PointInT, FeatureT>::getP
2222
using mv_pair = std::pair<std::string, int>;
2323
mv_pair pair_model_view = std::make_pair(model.id_, view_id);
2424

25-
std::map<mv_pair,
26-
Eigen::Matrix4f,
27-
std::less<>,
28-
Eigen::aligned_allocator<std::pair<const mv_pair, Eigen::Matrix4f>>>::
29-
iterator it = poses_cache_.find(pair_model_view);
25+
auto it = poses_cache_.find(pair_model_view);
3026

3127
if (it != poses_cache_.end()) {
3228
pose_matrix = it->second;

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_cvfh.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ pcl::rec_3d_framework::GlobalNNCVFHRecognizer<Distance, PointInT, FeatureT>::get
2222
using mv_pair = std::pair<std::string, int>;
2323
mv_pair pair_model_view = std::make_pair(model.id_, view_id);
2424

25-
std::map<mv_pair,
26-
Eigen::Matrix4f,
27-
std::less<>,
28-
Eigen::aligned_allocator<std::pair<const mv_pair, Eigen::Matrix4f>>>::
29-
iterator it = poses_cache_.find(pair_model_view);
25+
auto it = poses_cache_.find(pair_model_view);
3026

3127
if (it != poses_cache_.end()) {
3228
pose_matrix = it->second;

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/local_recognizer.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,11 +460,7 @@ pcl::rec_3d_framework::LocalRecognitionPipeline<Distance, PointInT, FeatureT>::g
460460
using mv_pair = std::pair<std::string, int>;
461461
mv_pair pair_model_view = std::make_pair(model.id_, view_id);
462462

463-
std::map<mv_pair,
464-
Eigen::Matrix4f,
465-
std::less<>,
466-
Eigen::aligned_allocator<std::pair<const mv_pair, Eigen::Matrix4f>>>::
467-
iterator it = poses_cache_.find(pair_model_view);
463+
auto it = poses_cache_.find(pair_model_view);
468464

469465
if (it != poses_cache_.end()) {
470466
pose_matrix = it->second;
@@ -489,7 +485,7 @@ pcl::rec_3d_framework::LocalRecognitionPipeline<Distance, PointInT, FeatureT>::
489485

490486
if (use_cache_) {
491487
std::pair<std::string, int> pair_model_view = std::make_pair(model.id_, view_id);
492-
typename std::map<std::pair<std::string, int>, PointInTPtr>::iterator it =
488+
auto it =
493489
keypoints_cache_.find(pair_model_view);
494490

495491
if (it != keypoints_cache_.end()) {

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/local_recognizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class PCL_EXPORTS LocalRecognitionPipeline {
195195
}
196196

197197
public:
198-
LocalRecognitionPipeline() : search_model_("")
198+
LocalRecognitionPipeline() :
199199
{
200200
use_cache_ = false;
201201
threshold_accept_model_hypothesis_ = 0.2f;

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/tools/openni_frame_source.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class PCL_EXPORTS OpenNIFrameSource {
3131

3232
pcl::OpenNIGrabber grabber_;
3333
PointCloudPtr most_recent_frame_;
34-
int frame_counter_;
34+
int frame_counter_{0};
3535
std::mutex mutex_;
36-
bool active_;
36+
bool active_{true};
3737
};
3838

3939
} // namespace OpenNIFrameSource

apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/utils/persistence_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ writeMatrixToFile(const std::string& file, Eigen::Matrix4f& matrix)
5454
for (std::size_t i = 0; i < 4; i++) {
5555
for (std::size_t j = 0; j < 4; j++) {
5656
out << matrix(i, j);
57-
if (!(i == 3 && j == 3))
57+
if (i != 3 || j != 3)
5858
out << " ";
5959
}
6060
}

apps/3d_rec_framework/src/tools/local_recognition_mian_dataset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ recognizeAndVisualize(
102102
for (std::size_t i = 0; i < files.size(); i++) {
103103
std::cout << files[i] << std::endl;
104104
if (scene != -1)
105-
if ((std::size_t)scene != i)
105+
if (static_cast<std::size_t>(scene) != i)
106106
continue;
107107

108108
const std::string file = ply_files_dir.string() + files[i];

apps/3d_rec_framework/src/tools/openni_frame_source.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace OpenNIFrameSource {
66

77
OpenNIFrameSource::OpenNIFrameSource(const std::string& device_id)
8-
: grabber_(device_id), frame_counter_(0), active_(true)
8+
: grabber_(device_id),
99
{
1010
std::function<void(const PointCloudConstPtr&)> frame_cb =
1111
[this](const PointCloudConstPtr& cloud) { onNewFrame(cloud); };

0 commit comments

Comments
 (0)