From dc96f98fa964da031e2341bafb9dec38281ef320 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Sat, 27 Feb 2021 17:15:31 -0800 Subject: [PATCH 01/16] Bare-bones clang-tidy enabled [PCL-2731] --- .clang-tidy | 3 +++ CMakeLists.txt | 1 + 2 files changed, 4 insertions(+) create mode 100644 .clang-tidy diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000000..3176eba81d5 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,3 @@ +--- +Checks: '-*,modernize-deprecated-headers,modernize-redundant-void-arg,modernize-replace-random-shuffle,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,modernize-use-override,modernize-use-using' +WarningsAsErrors: '#same content as in checks, but for errors' diff --git a/CMakeLists.txt b/CMakeLists.txt index 8702405a038..ceec26b0be8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ if(POLICY CMP0074) endif() # Set target C++ standard and required compiler features +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 14 CACHE STRING "The target C++ standard. PCL requires C++14 or higher.") set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) From 5cfc686ae257c1d5e82d723c948eee10bb5e5741 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Sat, 27 Feb 2021 18:39:21 -0800 Subject: [PATCH 02/16] Ran clang-tidy modernization for all modules [PCL-2731] Signed-off-by: Norm Evangelista --- common/include/pcl/ModelCoefficients.h | 3 +- common/include/pcl/PointIndices.h | 2 +- common/include/pcl/PolygonMesh.h | 2 +- common/include/pcl/Vertices.h | 2 +- common/include/pcl/cloud_iterator.h | 4 +- common/include/pcl/console/time.h | 2 +- common/include/pcl/impl/cloud_iterator.hpp | 12 ++--- common/include/pcl/point_representation.h | 2 +- .../pcl/range_image/range_image_planar.h | 2 +- common/src/feature_histogram.cpp | 4 +- common/src/range_image_planar.cpp | 3 +- features/include/pcl/features/3dsc.h | 2 +- features/include/pcl/features/board.h | 2 +- features/include/pcl/features/don.h | 2 +- .../impl/linear_least_squares_normal.hpp | 3 +- .../include/pcl/features/integral_image2D.h | 4 +- .../pcl/features/integral_image_normal.h | 2 +- .../features/linear_least_squares_normal.h | 2 +- .../features/moment_of_inertia_estimation.h | 2 +- .../features/multiscale_feature_persistence.h | 2 +- features/include/pcl/features/narf.h | 2 +- .../include/pcl/features/narf_descriptor.h | 2 +- features/include/pcl/features/normal_3d.h | 2 +- .../pcl/features/organized_edge_detection.h | 20 +++----- .../features/range_image_border_extractor.h | 2 +- .../include/pcl/features/rops_estimation.h | 2 +- features/include/pcl/features/shot.h | 6 +-- features/include/pcl/features/shot_lrf.h | 2 +- features/include/pcl/features/shot_lrf_omp.h | 2 +- features/include/pcl/features/spin_image.h | 2 +- ...al_multiscale_interest_region_extraction.h | 2 +- features/include/pcl/features/usc.h | 2 +- features/src/narf.cpp | 3 +- .../pcl/filters/approximate_voxel_grid.h | 2 +- .../include/pcl/filters/conditional_removal.h | 10 ++-- filters/include/pcl/filters/convolution.h | 2 +- filters/include/pcl/filters/fast_bilateral.h | 2 +- filters/include/pcl/filters/grid_minimum.h | 5 +- filters/include/pcl/filters/project_inliers.h | 4 +- .../include/pcl/filters/uniform_sampling.h | 2 +- filters/include/pcl/filters/voxel_grid.h | 10 ++-- .../include/pcl/filters/voxel_grid_label.h | 2 +- .../filters/voxel_grid_occlusion_estimation.h | 5 +- .../include/pcl/geometry/planar_polygon.h | 2 +- io/include/pcl/compression/color_coding.h | 3 +- .../pcl/compression/entropy_range_coder.h | 9 ++-- .../octree_pointcloud_compression.h | 5 +- .../organized_pointcloud_compression.h | 6 +-- io/include/pcl/compression/point_coding.h | 3 +- io/include/pcl/io/ascii_io.h | 2 +- io/include/pcl/io/ensenso_grabber.h | 16 +++--- io/include/pcl/io/file_grabber.h | 2 +- io/include/pcl/io/file_io.h | 8 +-- io/include/pcl/io/hdl_grabber.h | 2 +- io/include/pcl/io/ifs_io.h | 8 +-- io/include/pcl/io/image_grabber.h | 4 +- io/include/pcl/io/io_exception.h | 2 +- io/include/pcl/io/lzf_image_io.h | 34 ++++++------- io/include/pcl/io/obj_io.h | 6 +-- io/include/pcl/io/oni_grabber.h | 2 +- .../pcl/io/openni_camera/openni_depth_image.h | 2 +- .../io/openni_camera/openni_device_kinect.h | 2 +- .../pcl/io/openni_camera/openni_device_oni.h | 2 +- .../openni_camera/openni_device_primesense.h | 2 +- .../io/openni_camera/openni_device_xtion.h | 2 +- .../pcl/io/openni_camera/openni_exception.h | 2 +- .../pcl/io/openni_camera/openni_image.h | 2 +- .../openni_camera/openni_image_bayer_grbg.h | 2 +- .../pcl/io/openni_camera/openni_image_rgb24.h | 2 +- .../io/openni_camera/openni_image_yuv_422.h | 2 +- .../pcl/io/openni_camera/openni_ir_image.h | 3 +- .../openni_shift_to_depth_conversion.h | 2 +- io/include/pcl/io/openni_grabber.h | 2 +- io/include/pcl/io/pcd_grabber.h | 4 +- io/include/pcl/io/pcd_io.h | 6 +-- io/include/pcl/io/ply/ply_parser.h | 2 +- io/include/pcl/io/ply_io.h | 6 +-- .../pcl/io/point_cloud_image_extractors.h | 20 ++++---- io/include/pcl/io/robot_eye_grabber.h | 2 +- io/include/pcl/io/vlp_grabber.h | 2 +- io/src/ascii_io.cpp | 3 +- io/src/ensenso_grabber.cpp | 24 ++++----- io/src/io_exception.cpp | 3 +- io/src/openni_camera/openni_driver.cpp | 9 +--- io/src/openni_camera/openni_exception.cpp | 3 +- .../openni_camera/openni_image_bayer_grbg.cpp | 3 +- io/src/openni_camera/openni_image_rgb24.cpp | 3 +- io/src/openni_camera/openni_image_yuv_422.cpp | 3 +- io/src/vlp_grabber.cpp | 3 +- io/tools/openni_pcd_recorder.cpp | 2 +- kdtree/include/pcl/kdtree/kdtree.h | 2 +- kdtree/include/pcl/kdtree/kdtree_flann.h | 2 +- keypoints/include/pcl/keypoints/agast_2d.h | 21 ++++---- keypoints/include/pcl/keypoints/brisk_2d.h | 3 +- keypoints/include/pcl/keypoints/harris_3d.h | 2 +- keypoints/include/pcl/keypoints/harris_6d.h | 2 +- keypoints/include/pcl/keypoints/keypoint.h | 2 +- .../include/pcl/keypoints/narf_keypoint.h | 2 +- keypoints/include/pcl/keypoints/susan.h | 2 +- keypoints/src/brisk_2d.cpp | 3 +- ml/include/pcl/ml/branch_estimator.h | 10 ++-- ml/include/pcl/ml/dt/decision_forest.h | 4 +- ml/include/pcl/ml/dt/decision_tree.h | 2 +- .../pcl/ml/dt/decision_tree_data_provider.h | 4 +- ml/include/pcl/ml/feature_handler.h | 2 +- .../ml/impl/dt/decision_forest_evaluator.hpp | 2 +- .../ml/impl/dt/decision_forest_trainer.hpp | 2 +- .../ml/impl/dt/decision_tree_evaluator.hpp | 4 +- .../pcl/ml/impl/dt/decision_tree_trainer.hpp | 2 +- ml/include/pcl/ml/pairwise_potential.h | 2 +- ml/include/pcl/ml/point_xy_32f.h | 2 +- ml/include/pcl/ml/point_xy_32i.h | 2 +- ml/include/pcl/ml/stats_estimator.h | 2 +- ml/src/kmeans.cpp | 2 +- ml/src/svm.cpp | 16 +++--- octree/include/pcl/octree/octree2buf_base.h | 2 +- octree/include/pcl/octree/octree_nodes.h | 8 +-- .../octree_pointcloud_adjacency_container.h | 2 +- .../pcl/octree/octree_pointcloud_density.h | 4 +- .../pcl/octree/octree_pointcloud_occupancy.h | 2 +- .../octree/octree_pointcloud_pointvector.h | 2 +- .../octree/octree_pointcloud_singlepoint.h | 2 +- .../octree/octree_pointcloud_voxelcentroid.h | 4 +- outofcore/include/pcl/outofcore/cJSON.h | 22 ++++++-- .../include/pcl/outofcore/impl/lru_cache.hpp | 2 +- .../impl/outofcore_breadth_first_iterator.hpp | 3 +- .../impl/outofcore_depth_first_iterator.hpp | 3 +- outofcore/include/pcl/outofcore/metadata.h | 5 +- .../octree_abstract_node_container.h | 2 +- .../include/pcl/outofcore/octree_base_node.h | 2 +- .../pcl/outofcore/octree_disk_container.h | 2 +- .../pcl/outofcore/outofcore_base_data.h | 2 +- .../outofcore_breadth_first_iterator.h | 2 +- .../outofcore_depth_first_iterator.h | 2 +- .../pcl/outofcore/outofcore_iterator_base.h | 3 +- .../pcl/outofcore/visualization/geometry.h | 2 +- .../pcl/outofcore/visualization/grid.h | 2 +- .../pcl/outofcore/visualization/object.h | 2 +- outofcore/src/outofcore_node_data.cpp | 3 +- outofcore/src/visualization/scene.cpp | 4 +- .../pcl/people/impl/person_classifier.hpp | 4 +- people/src/hog.cpp | 2 +- .../3rdparty/metslib/abstract-search.hh | 16 +++--- .../pcl/recognition/3rdparty/metslib/model.hh | 50 +++++++++---------- .../recognition/3rdparty/metslib/observer.hh | 8 +-- .../3rdparty/metslib/simulated-annealing.hh | 12 ++--- .../3rdparty/metslib/tabu-search.hh | 28 +++++------ .../3rdparty/metslib/termination-criteria.hh | 20 ++++---- .../recognition/cg/correspondence_grouping.h | 2 +- .../pcl/recognition/color_gradient_modality.h | 5 +- .../include/pcl/recognition/distance_map.h | 2 +- .../include/pcl/recognition/dot_modality.h | 2 +- .../face_detector_data_provider.h | 4 +- .../face_detection/rf_face_detector_trainer.h | 4 +- .../face_detection/rf_face_utils.h | 5 +- recognition/include/pcl/recognition/linemod.h | 6 +-- .../pcl/recognition/linemod/line_rgbd.h | 3 +- .../pcl/recognition/ransac_based/bvh.h | 3 +- .../pcl/recognition/ransac_based/hypothesis.h | 4 +- .../recognition/ransac_based/model_library.h | 3 +- .../recognition/ransac_based/obj_rec_ransac.h | 8 +-- .../pcl/recognition/ransac_based/orr_graph.h | 4 +- .../pcl/recognition/ransac_based/orr_octree.h | 2 +- .../ransac_based/rigid_transform_space.h | 10 ++-- .../recognition/ransac_based/trimmed_icp.h | 4 +- .../sparse_quantized_multi_mod_template.h | 2 +- .../pcl/recognition/surface_normal_modality.h | 7 ++- recognition/src/dotmod.cpp | 3 +- recognition/src/linemod.cpp | 3 +- recognition/src/quantizable_modality.cpp | 9 ++-- .../pcl/registration/convergence_criteria.h | 4 +- .../registration/correspondence_estimation.h | 4 +- ...correspondence_estimation_backprojection.h | 2 +- ...orrespondence_estimation_normal_shooting.h | 2 +- .../registration/correspondence_rejection.h | 6 +-- .../correspondence_rejection_distance.h | 2 +- .../correspondence_rejection_features.h | 4 +- ...orrespondence_rejection_sample_consensus.h | 2 +- .../correspondence_rejection_trimmed.h | 2 +- .../default_convergence_criteria.h | 2 +- .../include/pcl/registration/distances.h | 3 +- registration/include/pcl/registration/elch.h | 2 +- .../include/pcl/registration/gicp6d.h | 2 +- .../include/pcl/registration/ia_ransac.h | 6 +-- registration/include/pcl/registration/icp.h | 4 +- ...ion_estimation_point_to_plane_weighted.hpp | 2 +- .../registration/incremental_registration.h | 2 +- .../include/pcl/registration/joint_icp.h | 2 +- registration/include/pcl/registration/ndt.h | 2 +- .../include/pcl/registration/ndt_2d.h | 2 +- .../registration/pyramid_feature_matching.h | 2 +- .../include/pcl/registration/registration.h | 2 +- .../sample_consensus_prerejective.h | 2 +- .../registration/transformation_estimation.h | 4 +- .../transformation_estimation_2D.h | 4 +- ...ransformation_estimation_dual_quaternion.h | 4 +- .../transformation_estimation_lm.h | 8 +-- ...transformation_estimation_point_to_plane.h | 4 +- ...sformation_estimation_point_to_plane_lls.h | 4 +- ...n_estimation_point_to_plane_lls_weighted.h | 4 +- ...ation_estimation_point_to_plane_weighted.h | 8 +-- .../transformation_estimation_svd.h | 2 +- ..._estimation_symmetric_point_to_plane_lls.h | 2 +- .../registration/transformation_validation.h | 4 +- .../transformation_validation_euclidean.h | 4 +- .../pcl/registration/warp_point_rigid.h | 2 +- .../pcl/registration/warp_point_rigid_3d.h | 2 +- .../pcl/registration/warp_point_rigid_6d.h | 2 +- .../include/pcl/sample_consensus/sac.h | 4 +- .../include/pcl/sample_consensus/sac_model.h | 6 +-- .../pcl/sample_consensus/sac_model_circle.h | 2 +- .../pcl/sample_consensus/sac_model_circle3d.h | 2 +- .../pcl/sample_consensus/sac_model_cone.h | 2 +- .../pcl/sample_consensus/sac_model_cylinder.h | 2 +- .../pcl/sample_consensus/sac_model_line.h | 2 +- .../sac_model_normal_parallel_plane.h | 2 +- .../sample_consensus/sac_model_normal_plane.h | 2 +- .../sac_model_normal_sphere.h | 2 +- .../sac_model_parallel_line.h | 2 +- .../sac_model_parallel_plane.h | 2 +- .../sac_model_perpendicular_plane.h | 2 +- .../pcl/sample_consensus/sac_model_plane.h | 2 +- .../sample_consensus/sac_model_registration.h | 2 +- .../sac_model_registration_2d.h | 2 +- .../pcl/sample_consensus/sac_model_sphere.h | 2 +- .../pcl/sample_consensus/sac_model_stick.h | 2 +- search/include/pcl/search/brute_force.h | 5 +- search/include/pcl/search/kdtree.h | 5 +- search/include/pcl/search/octree.h | 5 +- search/include/pcl/search/organized.h | 2 +- search/include/pcl/search/search.h | 3 +- ...oximate_progressive_morphological_filter.h | 2 +- .../include/pcl/segmentation/comparator.h | 3 +- .../pcl/segmentation/cpc_segmentation.h | 2 +- .../pcl/segmentation/grabcut_segmentation.h | 8 +-- ...imate_progressive_morphological_filter.hpp | 3 +- .../segmentation/impl/cpc_segmentation.hpp | 3 +- .../impl/crf_normal_segmentation.hpp | 6 +-- .../segmentation/impl/crf_segmentation.hpp | 3 +- .../segmentation/impl/lccp_segmentation.hpp | 3 +- .../impl/progressive_morphological_filter.hpp | 3 +- .../impl/supervoxel_clustering.hpp | 4 +- .../segmentation/impl/unary_classifier.hpp | 3 +- .../pcl/segmentation/min_cut_segmentation.h | 2 +- ...ganized_connected_component_segmentation.h | 5 +- .../organized_multi_plane_segmentation.h | 5 +- .../pcl/segmentation/planar_polygon_fusion.h | 2 +- .../include/pcl/segmentation/planar_region.h | 4 +- .../plane_coefficient_comparator.h | 5 +- .../plane_refinement_comparator.h | 5 +- .../progressive_morphological_filter.h | 2 +- .../include/pcl/segmentation/region_3d.h | 2 +- .../include/pcl/segmentation/region_growing.h | 2 +- .../pcl/segmentation/region_growing_rgb.h | 2 +- .../pcl/segmentation/sac_segmentation.h | 2 +- .../pcl/segmentation/supervoxel_clustering.h | 2 +- .../pcl/stereo/digital_elevation_map.h | 2 +- .../stereo/impl/disparity_map_converter.hpp | 2 +- stereo/include/pcl/stereo/stereo_grabber.h | 2 +- stereo/include/pcl/stereo/stereo_matching.h | 6 +-- stereo/src/digital_elevation_map.cpp | 2 +- stereo/src/stereo_matching.cpp | 4 +- .../surface/3rdparty/poisson4/bspline_data.h | 12 ++--- .../3rdparty/poisson4/bspline_data.hpp | 6 +-- .../pcl/surface/bilateral_upsampling.h | 2 +- surface/include/pcl/surface/concave_hull.h | 2 +- surface/include/pcl/surface/convex_hull.h | 2 +- surface/include/pcl/surface/ear_clipping.h | 3 +- surface/include/pcl/surface/grid_projection.h | 4 +- .../pcl/surface/impl/marching_cubes.hpp | 3 +- .../pcl/surface/impl/marching_cubes_hoppe.hpp | 3 +- .../pcl/surface/impl/marching_cubes_rbf.hpp | 3 +- surface/include/pcl/surface/impl/poisson.hpp | 3 +- surface/include/pcl/surface/marching_cubes.h | 2 +- .../pcl/surface/marching_cubes_hoppe.h | 2 +- .../include/pcl/surface/marching_cubes_rbf.h | 2 +- surface/include/pcl/surface/mls.h | 6 +-- .../include/pcl/surface/organized_fast_mesh.h | 2 +- surface/include/pcl/surface/poisson.h | 2 +- surface/include/pcl/surface/processing.h | 10 ++-- surface/include/pcl/surface/reconstruction.h | 6 +-- .../simplification_remove_unused_vertices.h | 4 +- .../include/pcl/surface/surfel_smoothing.h | 4 +- surface/include/pcl/surface/texture_mapping.h | 3 +- surface/src/3rdparty/poisson4/factor.cpp | 3 +- surface/src/3rdparty/poisson4/geometry.cpp | 20 ++++---- tools/ensenso_viewer.cpp | 2 +- tools/openni_image.cpp | 2 +- tracking/include/pcl/tracking/coherence.h | 6 +-- .../pcl/visualization/histogram_visualizer.h | 2 +- .../include/pcl/visualization/image_viewer.h | 2 +- .../pcl/visualization/interactor_style.h | 2 +- .../pcl/visualization/pcl_visualizer.h | 2 +- .../pcl/visualization/point_picking_event.h | 2 +- .../visualization/range_image_visualizer.h | 2 +- visualization/src/cloud_viewer.cpp | 3 +- visualization/src/image_viewer.cpp | 3 +- visualization/src/pcl_plotter.cpp | 2 +- visualization/src/range_image_visualizer.cpp | 3 +- 299 files changed, 578 insertions(+), 662 deletions(-) diff --git a/common/include/pcl/ModelCoefficients.h b/common/include/pcl/ModelCoefficients.h index 84f7336ba0b..62c51f8b0e4 100644 --- a/common/include/pcl/ModelCoefficients.h +++ b/common/include/pcl/ModelCoefficients.h @@ -11,8 +11,7 @@ namespace pcl struct ModelCoefficients { ModelCoefficients () - { - } + = default; ::pcl::PCLHeader header; diff --git a/common/include/pcl/PointIndices.h b/common/include/pcl/PointIndices.h index 53e19dfb16c..b3fdddced5f 100644 --- a/common/include/pcl/PointIndices.h +++ b/common/include/pcl/PointIndices.h @@ -14,7 +14,7 @@ namespace pcl using ConstPtr = shared_ptr; PointIndices () - {} + = default; ::pcl::PCLHeader header; diff --git a/common/include/pcl/PolygonMesh.h b/common/include/pcl/PolygonMesh.h index ae610dcc34f..d28d923cc88 100644 --- a/common/include/pcl/PolygonMesh.h +++ b/common/include/pcl/PolygonMesh.h @@ -14,7 +14,7 @@ namespace pcl struct PolygonMesh { PolygonMesh () - {} + = default; ::pcl::PCLHeader header; diff --git a/common/include/pcl/Vertices.h b/common/include/pcl/Vertices.h index fe5b5d842de..a2a03c7980f 100644 --- a/common/include/pcl/Vertices.h +++ b/common/include/pcl/Vertices.h @@ -14,7 +14,7 @@ namespace pcl struct Vertices { Vertices () - {} + = default; Indices vertices; diff --git a/common/include/pcl/cloud_iterator.h b/common/include/pcl/cloud_iterator.h index 11908bb3347..3300292cca1 100644 --- a/common/include/pcl/cloud_iterator.h +++ b/common/include/pcl/cloud_iterator.h @@ -89,7 +89,7 @@ namespace pcl class Iterator { public: - virtual ~Iterator () {} + virtual ~Iterator () = default; virtual void operator ++ () = 0; @@ -158,7 +158,7 @@ namespace pcl class Iterator { public: - virtual ~Iterator () {} + virtual ~Iterator () = default; virtual void operator ++ () = 0; diff --git a/common/include/pcl/console/time.h b/common/include/pcl/console/time.h index 079453233f8..38b028d8c39 100644 --- a/common/include/pcl/console/time.h +++ b/common/include/pcl/console/time.h @@ -50,7 +50,7 @@ namespace pcl { public: - TicToc () {} + TicToc () = default; void tic () diff --git a/common/include/pcl/impl/cloud_iterator.hpp b/common/include/pcl/impl/cloud_iterator.hpp index 397419e76b7..83cfe7ad633 100644 --- a/common/include/pcl/impl/cloud_iterator.hpp +++ b/common/include/pcl/impl/cloud_iterator.hpp @@ -57,8 +57,7 @@ namespace pcl } ~DefaultIterator () - { - } + = default; void operator ++ () { @@ -130,7 +129,7 @@ namespace pcl { } - virtual ~IteratorIdx () {} + virtual ~IteratorIdx () = default; void operator ++ () { @@ -196,9 +195,8 @@ namespace pcl { } - ~DefaultConstIterator () - { - } + ~DefaultConstIterator () override + = default; void operator ++ () override { @@ -272,7 +270,7 @@ namespace pcl { } - ~ConstIteratorIdx () {} + ~ConstIteratorIdx () override = default; void operator ++ () override { diff --git a/common/include/pcl/point_representation.h b/common/include/pcl/point_representation.h index 4bcabcfd1f2..9d64be4e0df 100644 --- a/common/include/pcl/point_representation.h +++ b/common/include/pcl/point_representation.h @@ -196,7 +196,7 @@ namespace pcl trivial_ = true; } - ~DefaultPointRepresentation () {} + ~DefaultPointRepresentation () override = default; inline Ptr makeShared () const diff --git a/common/include/pcl/range_image/range_image_planar.h b/common/include/pcl/range_image/range_image_planar.h index a09511880cf..3d2cac07048 100644 --- a/common/include/pcl/range_image/range_image_planar.h +++ b/common/include/pcl/range_image/range_image_planar.h @@ -60,7 +60,7 @@ namespace pcl /** Constructor */ PCL_EXPORTS RangeImagePlanar (); /** Destructor */ - PCL_EXPORTS ~RangeImagePlanar (); + PCL_EXPORTS ~RangeImagePlanar () override; /** Return a newly created RangeImagePlanar. * Reimplementation to return an image of the same type. */ diff --git a/common/src/feature_histogram.cpp b/common/src/feature_histogram.cpp index df9c7d410d2..ccdae01a488 100644 --- a/common/src/feature_histogram.cpp +++ b/common/src/feature_histogram.cpp @@ -65,9 +65,7 @@ pcl::FeatureHistogram::FeatureHistogram (std::size_t const number_of_bins, } pcl::FeatureHistogram::~FeatureHistogram () -{ - -} += default; float pcl::FeatureHistogram::getThresholdMin () const diff --git a/common/src/range_image_planar.cpp b/common/src/range_image_planar.cpp index 5c649aea93f..62630978d05 100644 --- a/common/src/range_image_planar.cpp +++ b/common/src/range_image_planar.cpp @@ -51,8 +51,7 @@ namespace pcl ///////////////////////////////////////////////////////////////////////// RangeImagePlanar::~RangeImagePlanar () - { - } + = default; ///////////////////////////////////////////////////////////////////////// void diff --git a/features/include/pcl/features/3dsc.h b/features/include/pcl/features/3dsc.h index 0d5bba72b3d..7c7a7ba062a 100644 --- a/features/include/pcl/features/3dsc.h +++ b/features/include/pcl/features/3dsc.h @@ -118,7 +118,7 @@ namespace pcl rng_.seed (12345u); } - ~ShapeContext3DEstimation() {} + ~ShapeContext3DEstimation() override = default; //inline void //setAzimuthBins (std::size_t bins) { azimuth_bins_ = bins; } diff --git a/features/include/pcl/features/board.h b/features/include/pcl/features/board.h index 40896251eeb..2e323ca4775 100644 --- a/features/include/pcl/features/board.h +++ b/features/include/pcl/features/board.h @@ -75,7 +75,7 @@ namespace pcl } /** \brief Empty destructor */ - ~BOARDLocalReferenceFrameEstimation () {} + ~BOARDLocalReferenceFrameEstimation () override = default; //Getters/Setters diff --git a/features/include/pcl/features/don.h b/features/include/pcl/features/don.h index 41125804d06..5a50a584f86 100644 --- a/features/include/pcl/features/don.h +++ b/features/include/pcl/features/don.h @@ -86,7 +86,7 @@ namespace pcl feature_name_ = "DifferenceOfNormalsEstimation"; } - ~DifferenceOfNormalsEstimation () + ~DifferenceOfNormalsEstimation () override { // } diff --git a/features/include/pcl/features/impl/linear_least_squares_normal.hpp b/features/include/pcl/features/impl/linear_least_squares_normal.hpp index e0d97f64249..dab95f526c2 100644 --- a/features/include/pcl/features/impl/linear_least_squares_normal.hpp +++ b/features/include/pcl/features/impl/linear_least_squares_normal.hpp @@ -45,8 +45,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::LinearLeastSquaresNormalEstimation::~LinearLeastSquaresNormalEstimation () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/features/include/pcl/features/integral_image2D.h b/features/include/pcl/features/integral_image2D.h index 864a195fa53..5d4e778494b 100644 --- a/features/include/pcl/features/integral_image2D.h +++ b/features/include/pcl/features/integral_image2D.h @@ -129,7 +129,7 @@ namespace pcl /** \brief Destructor */ virtual - ~IntegralImage2D () { } + ~IntegralImage2D () = default; /** \brief sets the computation for second order integral images on or off. * \param compute_second_order_integral_images @@ -254,7 +254,7 @@ namespace pcl /** \brief Destructor */ virtual - ~IntegralImage2D () { } + ~IntegralImage2D () = default; /** \brief Set the input data to compute the integral image for * \param[in] data the input data diff --git a/features/include/pcl/features/integral_image_normal.h b/features/include/pcl/features/integral_image_normal.h index 183a66881a9..b9bc0628422 100644 --- a/features/include/pcl/features/integral_image_normal.h +++ b/features/include/pcl/features/integral_image_normal.h @@ -136,7 +136,7 @@ namespace pcl } /** \brief Destructor **/ - ~IntegralImageNormalEstimation (); + ~IntegralImageNormalEstimation () override; /** \brief Set the regions size which is considered for normal estimation. * \param[in] width the width of the search rectangle diff --git a/features/include/pcl/features/linear_least_squares_normal.h b/features/include/pcl/features/linear_least_squares_normal.h index e6691f39570..bf2ce2e1794 100644 --- a/features/include/pcl/features/linear_least_squares_normal.h +++ b/features/include/pcl/features/linear_least_squares_normal.h @@ -70,7 +70,7 @@ namespace pcl }; /** \brief Destructor */ - ~LinearLeastSquaresNormalEstimation (); + ~LinearLeastSquaresNormalEstimation () override; /** \brief Computes the normal at the specified position. * \param[in] pos_x x position (pixel) diff --git a/features/include/pcl/features/moment_of_inertia_estimation.h b/features/include/pcl/features/moment_of_inertia_estimation.h index f309efbd45f..f827771151e 100644 --- a/features/include/pcl/features/moment_of_inertia_estimation.h +++ b/features/include/pcl/features/moment_of_inertia_estimation.h @@ -107,7 +107,7 @@ namespace pcl /** \brief Virtual destructor which frees the memory. */ - ~MomentOfInertiaEstimation (); + ~MomentOfInertiaEstimation () override; /** \brief This method allows to set the angle step. It is used for the rotation * of the axis which is used for moment of inertia/eccentricity calculation. diff --git a/features/include/pcl/features/multiscale_feature_persistence.h b/features/include/pcl/features/multiscale_feature_persistence.h index ca55b60958f..73069622b3e 100644 --- a/features/include/pcl/features/multiscale_feature_persistence.h +++ b/features/include/pcl/features/multiscale_feature_persistence.h @@ -76,7 +76,7 @@ namespace pcl MultiscaleFeaturePersistence (); /** \brief Empty destructor */ - ~MultiscaleFeaturePersistence () {} + ~MultiscaleFeaturePersistence () override = default; /** \brief Method that calls computeFeatureAtScale () for each scale parameter */ void diff --git a/features/include/pcl/features/narf.h b/features/include/pcl/features/narf.h index 34dbfacf39f..bd0727f87ac 100644 --- a/features/include/pcl/features/narf.h +++ b/features/include/pcl/features/narf.h @@ -240,7 +240,7 @@ namespace pcl using PointT = Narf *; FeaturePointRepresentation(int nr_dimensions) { this->nr_dimensions_ = nr_dimensions; } /** \brief Empty destructor */ - ~FeaturePointRepresentation () {} + ~FeaturePointRepresentation () override = default; void copyToFloatArray (const PointT& p, float* out) const override { memcpy(out, p->getDescriptor(), sizeof(*p->getDescriptor())*this->nr_dimensions_); } }; diff --git a/features/include/pcl/features/narf_descriptor.h b/features/include/pcl/features/narf_descriptor.h index c454a3b46f3..9dc2e92660c 100644 --- a/features/include/pcl/features/narf_descriptor.h +++ b/features/include/pcl/features/narf_descriptor.h @@ -72,7 +72,7 @@ namespace pcl /** Constructor */ NarfDescriptor (const RangeImage* range_image=nullptr, const pcl::Indices* indices=nullptr); /** Destructor */ - ~NarfDescriptor(); + ~NarfDescriptor() override; // =====METHODS===== //! Set input data diff --git a/features/include/pcl/features/normal_3d.h b/features/include/pcl/features/normal_3d.h index 8fe9c32a512..44aecf6e3d4 100644 --- a/features/include/pcl/features/normal_3d.h +++ b/features/include/pcl/features/normal_3d.h @@ -268,7 +268,7 @@ namespace pcl }; /** \brief Empty destructor */ - ~NormalEstimation () {} + ~NormalEstimation () override = default; /** \brief Compute the Least-Squares plane fit for a given set of points, using their indices, * and return the estimated plane parameters together with the surface curvature. diff --git a/features/include/pcl/features/organized_edge_detection.h b/features/include/pcl/features/organized_edge_detection.h index dd889caa588..33d0ea02ac2 100644 --- a/features/include/pcl/features/organized_edge_detection.h +++ b/features/include/pcl/features/organized_edge_detection.h @@ -82,9 +82,8 @@ namespace pcl /** \brief Destructor for OrganizedEdgeBase */ - ~OrganizedEdgeBase () - { - } + ~OrganizedEdgeBase () override + = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities) * \param[out] labels a PointCloud of edge labels @@ -212,9 +211,8 @@ namespace pcl /** \brief Destructor for OrganizedEdgeFromRGB */ - ~OrganizedEdgeFromRGB () - { - } + ~OrganizedEdgeFromRGB () override + = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities and RGB Canny edge) and assign point indices for each edge label * \param[out] labels a PointCloud of edge labels @@ -303,9 +301,8 @@ namespace pcl /** \brief Destructor for OrganizedEdgeFromNormals */ - ~OrganizedEdgeFromNormals () - { - } + ~OrganizedEdgeFromNormals () override + = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities and high curvature regions) and assign point indices for each edge label * \param[out] labels a PointCloud of edge labels @@ -412,9 +409,8 @@ namespace pcl /** \brief Destructor for OrganizedEdgeFromRGBNormals */ - ~OrganizedEdgeFromRGBNormals () - { - } + ~OrganizedEdgeFromRGBNormals () override + = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities, RGB Canny edge, and high curvature regions) and assign point indices for each edge label * \param[out] labels a PointCloud of edge labels diff --git a/features/include/pcl/features/range_image_border_extractor.h b/features/include/pcl/features/range_image_border_extractor.h index a87dcb327d7..29ef75c0f3a 100644 --- a/features/include/pcl/features/range_image_border_extractor.h +++ b/features/include/pcl/features/range_image_border_extractor.h @@ -107,7 +107,7 @@ namespace pcl /** Constructor */ RangeImageBorderExtractor (const RangeImage* range_image=nullptr); /** Destructor */ - ~RangeImageBorderExtractor (); + ~RangeImageBorderExtractor () override; // =====METHODS===== /** \brief Provide a pointer to the range image diff --git a/features/include/pcl/features/rops_estimation.h b/features/include/pcl/features/rops_estimation.h index 60e44f1257b..6d5cb347405 100644 --- a/features/include/pcl/features/rops_estimation.h +++ b/features/include/pcl/features/rops_estimation.h @@ -72,7 +72,7 @@ namespace pcl /** \brief Virtual destructor. */ - ~ROPSEstimation (); + ~ROPSEstimation () override; /** \brief Allows to set the number of partition bins that is used for distribution matrix calculation. * \param[in] number_of_bins number of partition bins diff --git a/features/include/pcl/features/shot.h b/features/include/pcl/features/shot.h index 24041664c3a..d1aabf8d687 100644 --- a/features/include/pcl/features/shot.h +++ b/features/include/pcl/features/shot.h @@ -103,7 +103,7 @@ namespace pcl public: /** \brief Empty destructor */ - ~SHOTEstimationBase () {} + ~SHOTEstimationBase () override = default; /** \brief Estimate the SHOT descriptor for a given point based on its spatial neighborhood of 3D points with normals * \param[in] index the index of the point in indices_ @@ -251,7 +251,7 @@ namespace pcl }; /** \brief Empty destructor */ - ~SHOTEstimation () {} + ~SHOTEstimation () override = default; /** \brief Estimate the SHOT descriptor for a given point based on its spatial neighborhood of 3D points with normals * \param[in] index the index of the point in indices_ @@ -337,7 +337,7 @@ namespace pcl }; /** \brief Empty destructor */ - ~SHOTColorEstimation () {} + ~SHOTColorEstimation () override = default; /** \brief Estimate the SHOT descriptor for a given point based on its spatial neighborhood of 3D points with normals * \param[in] index the index of the point in indices_ diff --git a/features/include/pcl/features/shot_lrf.h b/features/include/pcl/features/shot_lrf.h index 35c28f138f8..9a122e2db2f 100644 --- a/features/include/pcl/features/shot_lrf.h +++ b/features/include/pcl/features/shot_lrf.h @@ -74,7 +74,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SHOTLocalReferenceFrameEstimation () {} + ~SHOTLocalReferenceFrameEstimation () override = default; protected: using Feature::feature_name_; diff --git a/features/include/pcl/features/shot_lrf_omp.h b/features/include/pcl/features/shot_lrf_omp.h index 2100d09827c..1c32ccffea9 100644 --- a/features/include/pcl/features/shot_lrf_omp.h +++ b/features/include/pcl/features/shot_lrf_omp.h @@ -77,7 +77,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SHOTLocalReferenceFrameEstimationOMP () {} + ~SHOTLocalReferenceFrameEstimationOMP () override = default; /** \brief Initialize the scheduler and set the number of threads to use. * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic) diff --git a/features/include/pcl/features/spin_image.h b/features/include/pcl/features/spin_image.h index 30d5b51c3f6..73a22356709 100644 --- a/features/include/pcl/features/spin_image.h +++ b/features/include/pcl/features/spin_image.h @@ -122,7 +122,7 @@ namespace pcl unsigned int min_pts_neighb = 0); /** \brief Empty destructor */ - ~SpinImageEstimation () {} + ~SpinImageEstimation () override = default; /** \brief Sets spin-image resolution. * diff --git a/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h b/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h index f71cf541677..a80dc7c7e9a 100644 --- a/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h +++ b/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h @@ -71,7 +71,7 @@ namespace pcl /** \brief Empty constructor */ StatisticalMultiscaleInterestRegionExtraction () - {}; + = default;; /** \brief Method that generates the underlying nearest neighbor graph based on the * input point cloud diff --git a/features/include/pcl/features/usc.h b/features/include/pcl/features/usc.h index 03a402a7ea9..fed3fe8eb3a 100644 --- a/features/include/pcl/features/usc.h +++ b/features/include/pcl/features/usc.h @@ -91,7 +91,7 @@ namespace pcl search_radius_ = 2.0; } - ~UniqueShapeContext() { } + ~UniqueShapeContext() override = default; /** \return The number of bins along the azimuth. */ inline std::size_t diff --git a/features/src/narf.cpp b/features/src/narf.cpp index 235e98eb1c8..d8373ae7316 100644 --- a/features/src/narf.cpp +++ b/features/src/narf.cpp @@ -609,8 +609,7 @@ NarfDescriptor::NarfDescriptor (const RangeImage* range_image, const pcl::Indice ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// NarfDescriptor::~NarfDescriptor () -{ -} += default; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/filters/include/pcl/filters/approximate_voxel_grid.h b/filters/include/pcl/filters/approximate_voxel_grid.h index b58c4d8ab73..916144c2ab5 100644 --- a/filters/include/pcl/filters/approximate_voxel_grid.h +++ b/filters/include/pcl/filters/approximate_voxel_grid.h @@ -151,7 +151,7 @@ namespace pcl /** \brief Destructor. */ - ~ApproximateVoxelGrid () + ~ApproximateVoxelGrid () override { delete [] history_; } diff --git a/filters/include/pcl/filters/conditional_removal.h b/filters/include/pcl/filters/conditional_removal.h index 3b9250188ca..c0a6db9f1b4 100644 --- a/filters/include/pcl/filters/conditional_removal.h +++ b/filters/include/pcl/filters/conditional_removal.h @@ -96,7 +96,7 @@ namespace pcl ComparisonBase () : capable_ (false), offset_ (), op_ () {} /** \brief Destructor. */ - virtual ~ComparisonBase () {} + virtual ~ComparisonBase () = default; /** \brief Return if the comparison is capable. */ inline bool @@ -165,7 +165,7 @@ namespace pcl } /** \brief Destructor. */ - ~FieldComparison (); + ~FieldComparison () override; /** \brief Determine the result of this comparison. * \param point the point to evaluate @@ -208,7 +208,7 @@ namespace pcl PackedRGBComparison (const std::string &component_name, ComparisonOps::CompareOp op, double compare_val); /** \brief Destructor. */ - ~PackedRGBComparison () {} + ~PackedRGBComparison () override = default; /** \brief Determine the result of this comparison. * \param point the point to evaluate @@ -255,7 +255,7 @@ namespace pcl PackedHSIComparison (const std::string &component_name, ComparisonOps::CompareOp op, double compare_val); /** \brief Destructor. */ - ~PackedHSIComparison () {} + ~PackedHSIComparison () override = default; /** \brief Determine the result of this comparison. * \param point the point to evaluate @@ -320,7 +320,7 @@ namespace pcl TfQuadraticXYZComparison (); /** \brief Empty destructor */ - ~TfQuadraticXYZComparison () {} + ~TfQuadraticXYZComparison () override = default; /** \brief Constructor. * \param op the operator "[OP]" of the comparison "p'Ap + 2v'p + c [OP] 0". diff --git a/filters/include/pcl/filters/convolution.h b/filters/include/pcl/filters/convolution.h index 2515b8cff9f..85bc5826353 100644 --- a/filters/include/pcl/filters/convolution.h +++ b/filters/include/pcl/filters/convolution.h @@ -90,7 +90,7 @@ namespace pcl /// Constructor Convolution (); /// Empty destructor - ~Convolution () {} + ~Convolution () = default; /** \brief Provide a pointer to the input dataset * \param cloud the const boost shared pointer to a PointCloud message * \remark Will perform a deep copy diff --git a/filters/include/pcl/filters/fast_bilateral.h b/filters/include/pcl/filters/fast_bilateral.h index 607bc0b5725..25e4f2e02c5 100644 --- a/filters/include/pcl/filters/fast_bilateral.h +++ b/filters/include/pcl/filters/fast_bilateral.h @@ -72,7 +72,7 @@ namespace pcl { } /** \brief Empty destructor */ - ~FastBilateralFilter () {} + ~FastBilateralFilter () override = default; /** \brief Set the standard deviation of the Gaussian used by the bilateral filter for * the spatial neighborhood/window. diff --git a/filters/include/pcl/filters/grid_minimum.h b/filters/include/pcl/filters/grid_minimum.h index 6c039ce82fa..932b898b8b7 100644 --- a/filters/include/pcl/filters/grid_minimum.h +++ b/filters/include/pcl/filters/grid_minimum.h @@ -77,9 +77,8 @@ namespace pcl } /** \brief Destructor. */ - ~GridMinimum () - { - } + ~GridMinimum () override + = default; /** \brief Set the grid resolution. * \param[in] resolution the grid resolution diff --git a/filters/include/pcl/filters/project_inliers.h b/filters/include/pcl/filters/project_inliers.h index 78c1601ab8a..6a7c36f6ad3 100644 --- a/filters/include/pcl/filters/project_inliers.h +++ b/filters/include/pcl/filters/project_inliers.h @@ -77,7 +77,7 @@ namespace pcl } /** \brief Empty destructor */ - ~ProjectInliers () {} + ~ProjectInliers () override = default; /** \brief The type of model to use (user given parameter). * \param model the model type (check \a model_types.h) @@ -180,7 +180,7 @@ namespace pcl } /** \brief Empty destructor */ - ~ProjectInliers () {} + ~ProjectInliers () override = default; /** \brief The type of model to use (user given parameter). * \param[in] model the model type (check \a model_types.h) diff --git a/filters/include/pcl/filters/uniform_sampling.h b/filters/include/pcl/filters/uniform_sampling.h index d8ec1ce6875..e2b1047b3e8 100644 --- a/filters/include/pcl/filters/uniform_sampling.h +++ b/filters/include/pcl/filters/uniform_sampling.h @@ -87,7 +87,7 @@ namespace pcl } /** \brief Destructor. */ - ~UniformSampling () + ~UniformSampling () override { leaves_.clear(); } diff --git a/filters/include/pcl/filters/voxel_grid.h b/filters/include/pcl/filters/voxel_grid.h index 72ee252f892..ebda20b5f43 100644 --- a/filters/include/pcl/filters/voxel_grid.h +++ b/filters/include/pcl/filters/voxel_grid.h @@ -210,9 +210,8 @@ namespace pcl } /** \brief Destructor. */ - ~VoxelGrid () - { - } + ~VoxelGrid () override + = default; /** \brief Set the voxel grid leaf size. * \param[in] leaf_size the voxel grid leaf size @@ -536,9 +535,8 @@ namespace pcl } /** \brief Destructor. */ - ~VoxelGrid () - { - } + ~VoxelGrid () override + = default; /** \brief Set the voxel grid leaf size. * \param[in] leaf_size the voxel grid leaf size diff --git a/filters/include/pcl/filters/voxel_grid_label.h b/filters/include/pcl/filters/voxel_grid_label.h index 9d4a7f2e823..3daa88d0cdd 100644 --- a/filters/include/pcl/filters/voxel_grid_label.h +++ b/filters/include/pcl/filters/voxel_grid_label.h @@ -58,7 +58,7 @@ namespace pcl /** \brief Constructor. * Sets \ref leaf_size_ to 0. */ - VoxelGridLabel () {}; + VoxelGridLabel () = default;; protected: diff --git a/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h b/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h index 4892373789f..41a13d9e725 100644 --- a/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h +++ b/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h @@ -74,9 +74,8 @@ namespace pcl } /** \brief Destructor. */ - ~VoxelGridOcclusionEstimation () - { - } + ~VoxelGridOcclusionEstimation () override + = default; /** \brief Initialize the voxel grid, needs to be called first * Builts the voxel grid and computes additional values for diff --git a/geometry/include/pcl/geometry/planar_polygon.h b/geometry/include/pcl/geometry/planar_polygon.h index e544799bc12..c5813567519 100644 --- a/geometry/include/pcl/geometry/planar_polygon.h +++ b/geometry/include/pcl/geometry/planar_polygon.h @@ -67,7 +67,7 @@ class PlanarPolygon { {} /** \brief Destructor. */ - virtual ~PlanarPolygon() {} + virtual ~PlanarPolygon () = default; /** \brief Set the internal contour * \param[in] contour the new planar polygonal contour diff --git a/io/include/pcl/compression/color_coding.h b/io/include/pcl/compression/color_coding.h index b4b9e6de5e5..d48b5bd6097 100644 --- a/io/include/pcl/compression/color_coding.h +++ b/io/include/pcl/compression/color_coding.h @@ -72,8 +72,7 @@ class ColorCoding /** \brief Empty class constructor. */ virtual ~ColorCoding () - { - } + = default; /** \brief Define color bit depth of encoded color information. * \param bitDepth_arg: amounts of bits for representing one color component diff --git a/io/include/pcl/compression/entropy_range_coder.h b/io/include/pcl/compression/entropy_range_coder.h index c449afa0a0a..a24b64fa94a 100644 --- a/io/include/pcl/compression/entropy_range_coder.h +++ b/io/include/pcl/compression/entropy_range_coder.h @@ -69,14 +69,12 @@ namespace pcl /** \brief Empty constructor. */ AdaptiveRangeCoder () - { - } + = default; /** \brief Empty deconstructor. */ virtual ~AdaptiveRangeCoder () - { - } + = default; /** \brief Encode char vector to output stream * \param inputByteVector_arg input vector @@ -124,8 +122,7 @@ namespace pcl /** \brief Empty deconstructor. */ virtual ~StaticRangeCoder () - { - } + = default; /** \brief Encode integer vector to output stream * \param[in] inputIntVector_arg input vector diff --git a/io/include/pcl/compression/octree_pointcloud_compression.h b/io/include/pcl/compression/octree_pointcloud_compression.h index d251d35e7b6..5c9085cf834 100644 --- a/io/include/pcl/compression/octree_pointcloud_compression.h +++ b/io/include/pcl/compression/octree_pointcloud_compression.h @@ -119,9 +119,8 @@ namespace pcl /** \brief Empty deconstructor. */ - ~OctreePointCloudCompression () - { - } + ~OctreePointCloudCompression () override + = default; /** \brief Initialize globals */ void initialization () { diff --git a/io/include/pcl/compression/organized_pointcloud_compression.h b/io/include/pcl/compression/organized_pointcloud_compression.h index 48e6f25a576..5cc2ebfcf81 100644 --- a/io/include/pcl/compression/organized_pointcloud_compression.h +++ b/io/include/pcl/compression/organized_pointcloud_compression.h @@ -61,13 +61,11 @@ namespace pcl /** \brief Empty Constructor. */ OrganizedPointCloudCompression () - { - } + = default; /** \brief Empty deconstructor. */ virtual ~OrganizedPointCloudCompression () - { - } + = default; /** \brief Encode point cloud to output stream * \param[in] cloud_arg: point cloud to be compressed diff --git a/io/include/pcl/compression/point_coding.h b/io/include/pcl/compression/point_coding.h index a23a8678ab1..38ab6303a17 100644 --- a/io/include/pcl/compression/point_coding.h +++ b/io/include/pcl/compression/point_coding.h @@ -69,8 +69,7 @@ class PointCoding /** \brief Empty class constructor. */ virtual ~PointCoding () - { - } + = default; /** \brief Define precision of point information * \param precision_arg: precision diff --git a/io/include/pcl/io/ascii_io.h b/io/include/pcl/io/ascii_io.h index d576d9a46da..2324b055fcc 100644 --- a/io/include/pcl/io/ascii_io.h +++ b/io/include/pcl/io/ascii_io.h @@ -56,7 +56,7 @@ namespace pcl { public: ASCIIReader (); - ~ASCIIReader (); + ~ASCIIReader () override; using FileReader::read; /* Load only the meta information (number of points, their types, etc), diff --git a/io/include/pcl/io/ensenso_grabber.h b/io/include/pcl/io/ensenso_grabber.h index f03fd6cd9aa..73ab572a21a 100644 --- a/io/include/pcl/io/ensenso_grabber.h +++ b/io/include/pcl/io/ensenso_grabber.h @@ -86,8 +86,8 @@ namespace pcl EnsensoGrabber (); /** @brief Destructor inherited from the Grabber interface. It never throws. */ - virtual - ~EnsensoGrabber () noexcept; + + ~EnsensoGrabber () noexcept override; /** @brief Searches for available devices * @returns The number of Ensenso devices connected */ @@ -108,16 +108,16 @@ namespace pcl /** @brief Start the point cloud and or image acquisition * @note Opens device "0" if no device is open */ void - start (); + start () override; /** @brief Stop the data acquisition */ void - stop (); + stop () override; /** @brief Check if the data acquisition is still running * @return True if running, false otherwise */ bool - isRunning () const; + isRunning () const override; /** @brief Check if a TCP port is opened * @return True if open, false otherwise */ @@ -127,7 +127,7 @@ namespace pcl /** @brief Get class name * @returns A string containing the class name */ std::string - getName () const; + getName () const override; /** @brief Configure Ensenso capture settings * @param[in] auto_exposure If set to yes, the exposure parameter will be ignored @@ -283,7 +283,7 @@ namespace pcl /** @brief Obtain the number of frames per second (FPS) */ float - getFramesPerSecond () const; + getFramesPerSecond () const override; /** @brief Open TCP port to enable access via the [nxTreeEdit](http://www.ensenso.de/manual/software_components.htm) program. * @param[in] port The port number @@ -296,7 +296,7 @@ namespace pcl * @warning If you do not close the TCP port the program might exit with the port still open, if it is the case * use @code ps -ef @endcode and @code kill PID @endcode to kill the application and effectively close the port. */ bool - closeTcpPort (void); + closeTcpPort (); /** @brief Returns the full NxLib tree as a JSON string * @param[in] pretty_format JSON formatting style diff --git a/io/include/pcl/io/file_grabber.h b/io/include/pcl/io/file_grabber.h index 400e2b9e181..0f0c378bf68 100644 --- a/io/include/pcl/io/file_grabber.h +++ b/io/include/pcl/io/file_grabber.h @@ -55,7 +55,7 @@ namespace pcl public: /** \brief Empty destructor */ - virtual ~FileGrabber () {} + virtual ~FileGrabber () = default; /** \brief operator[] Returns the idx-th cloud in the dataset, without bounds checking. * Note that in the future, this could easily be modified to do caching diff --git a/io/include/pcl/io/file_io.h b/io/include/pcl/io/file_io.h index 54f0856a618..40e179d7032 100644 --- a/io/include/pcl/io/file_io.h +++ b/io/include/pcl/io/file_io.h @@ -56,9 +56,9 @@ namespace pcl { public: /** \brief empty constructor */ - FileReader() {} + FileReader() = default; /** \brief empty destructor */ - virtual ~FileReader() {} + virtual ~FileReader() = default; /** \brief Read a point cloud data header from a FILE file. * * Load only the meta information (number of points, their types, etc), @@ -162,10 +162,10 @@ namespace pcl { public: /** \brief Empty constructor */ - FileWriter () {} + FileWriter () = default; /** \brief Empty destructor */ - virtual ~FileWriter () {} + virtual ~FileWriter () = default; /** \brief Save point cloud data to a FILE file containing n-D points * \param[in] file_name the output file name diff --git a/io/include/pcl/io/hdl_grabber.h b/io/include/pcl/io/hdl_grabber.h index 3688c2d8f73..f149346b4a3 100644 --- a/io/include/pcl/io/hdl_grabber.h +++ b/io/include/pcl/io/hdl_grabber.h @@ -112,7 +112,7 @@ namespace pcl /** \brief virtual Destructor inherited from the Grabber interface. It never throws. */ - ~HDLGrabber () noexcept; + ~HDLGrabber () noexcept override; /** \brief Starts processing the Velodyne packets, either from the network or PCAP file. */ void diff --git a/io/include/pcl/io/ifs_io.h b/io/include/pcl/io/ifs_io.h index 6b21808f069..6b4b2016139 100644 --- a/io/include/pcl/io/ifs_io.h +++ b/io/include/pcl/io/ifs_io.h @@ -53,9 +53,9 @@ namespace pcl { public: /** Empty constructor */ - IFSReader () {} + IFSReader () = default; /** Empty destructor */ - ~IFSReader () {} + ~IFSReader () = default; /** \brief we support two versions * 1.0 classic @@ -142,8 +142,8 @@ namespace pcl class PCL_EXPORTS IFSWriter { public: - IFSWriter() {} - ~IFSWriter() {} + IFSWriter() = default; + ~IFSWriter() = default; /** \brief Save point cloud data to an IFS file containing 3D points. * \param[in] file_name the output file name diff --git a/io/include/pcl/io/image_grabber.h b/io/include/pcl/io/image_grabber.h index b69a0f6df77..ab77591b464 100644 --- a/io/include/pcl/io/image_grabber.h +++ b/io/include/pcl/io/image_grabber.h @@ -76,7 +76,7 @@ namespace pcl ImageGrabberBase (const std::vector& depth_image_files, float frames_per_second, bool repeat); /** \brief Virtual destructor. */ - ~ImageGrabberBase () noexcept; + ~ImageGrabberBase () noexcept override; /** \brief Starts playing the list of PCD files if frames_per_second is > 0. Otherwise it works as a trigger: publishes only the next PCD file in the list. */ void @@ -217,7 +217,7 @@ namespace pcl bool repeat = false); /** \brief Empty destructor */ - ~ImageGrabber () noexcept {} + ~ImageGrabber () noexcept override = default; // Inherited from FileGrabber const typename pcl::PointCloud::ConstPtr diff --git a/io/include/pcl/io/io_exception.h b/io/include/pcl/io/io_exception.h index c78f0ec75b5..e266199a97a 100644 --- a/io/include/pcl/io/io_exception.h +++ b/io/include/pcl/io/io_exception.h @@ -67,7 +67,7 @@ namespace pcl unsigned line_number, const std::string& message); - ~IOException () noexcept; + ~IOException () noexcept override; IOException& operator= (const IOException& exception); diff --git a/io/include/pcl/io/lzf_image_io.h b/io/include/pcl/io/lzf_image_io.h index f5926c2da38..77bd0fafd4b 100644 --- a/io/include/pcl/io/lzf_image_io.h +++ b/io/include/pcl/io/lzf_image_io.h @@ -88,7 +88,7 @@ namespace pcl /** Empty constructor */ LZFImageReader (); /** Empty destructor */ - virtual ~LZFImageReader () {} + virtual ~LZFImageReader () = default; /** \brief Read camera parameters from a given file and store them internally. * \return true if operation successful, false otherwise @@ -194,7 +194,7 @@ namespace pcl {} /** Empty destructor */ - ~LZFDepth16ImageReader () {} + ~LZFDepth16ImageReader () override = default; /** \brief Read the data stored in a PCLZF depth file and convert it to a pcl::PointCloud type. * \param[in] filename the file name to read the data from @@ -242,9 +242,9 @@ namespace pcl using LZFImageReader::readParameters; /** Empty constructor */ - LZFRGB24ImageReader () {} + LZFRGB24ImageReader () = default; /** Empty destructor */ - ~LZFRGB24ImageReader () {} + ~LZFRGB24ImageReader () override = default; /** \brief Read the data stored in a PCLZF RGB file and convert it to a pcl::PointCloud type. * \param[in] filename the file name to read the data from @@ -289,9 +289,9 @@ namespace pcl using LZFRGB24ImageReader::readParameters; /** Empty constructor */ - LZFYUV422ImageReader () {} + LZFYUV422ImageReader () = default; /** Empty destructor */ - ~LZFYUV422ImageReader () {} + ~LZFYUV422ImageReader () override = default; /** \brief Read the data stored in a PCLZF YUV422 16bit file and convert it to a pcl::PointCloud type. * \param[in] filename the file name to read the data from @@ -327,9 +327,9 @@ namespace pcl using LZFRGB24ImageReader::readParameters; /** Empty constructor */ - LZFBayer8ImageReader () {} + LZFBayer8ImageReader () = default; /** Empty destructor */ - ~LZFBayer8ImageReader () {} + ~LZFBayer8ImageReader () override = default; /** \brief Read the data stored in a PCLZF Bayer 8bit file and convert it to a pcl::PointCloud type. * \param[in] filename the file name to read the data from @@ -377,9 +377,9 @@ namespace pcl { public: /** Empty constructor */ - LZFImageWriter () {} + LZFImageWriter () = default; /** Empty destructor */ - virtual ~LZFImageWriter () {} + virtual ~LZFImageWriter () = default; /** \brief Save an image into PCL-LZF format. Virtual. * \param[in] data the array holding the image @@ -485,7 +485,7 @@ namespace pcl {} /** Empty destructor */ - ~LZFDepth16ImageWriter () {} + ~LZFDepth16ImageWriter () override = default; /** \brief Save a 16-bit depth image into PCL-LZF format. * \param[in] data the array holding the depth image @@ -536,9 +536,9 @@ namespace pcl { public: /** Empty constructor */ - LZFRGB24ImageWriter () {} + LZFRGB24ImageWriter () = default; /** Empty destructor */ - ~LZFRGB24ImageWriter () {} + ~LZFRGB24ImageWriter () override = default; /** \brief Save a 24-bit RGB image into PCL-LZF format. * \param[in] data the array holding the RGB image (as [RGB..RGB] or [BGR..BGR]) @@ -578,9 +578,9 @@ namespace pcl { public: /** Empty constructor */ - LZFYUV422ImageWriter () {} + LZFYUV422ImageWriter () = default; /** Empty destructor */ - ~LZFYUV422ImageWriter () {} + ~LZFYUV422ImageWriter () override = default; /** \brief Save a 16-bit YUV422 image into PCL-LZF format. * \param[in] data the array holding the YUV422 image (as [YUYV...YUYV]) @@ -609,9 +609,9 @@ namespace pcl { public: /** Empty constructor */ - LZFBayer8ImageWriter () {} + LZFBayer8ImageWriter () = default; /** Empty destructor */ - ~LZFBayer8ImageWriter () {} + ~LZFBayer8ImageWriter () override = default; /** \brief Save a 8-bit Bayer image into PCL-LZF format. * \param[in] data the array holding the 8-bit Bayer array diff --git a/io/include/pcl/io/obj_io.h b/io/include/pcl/io/obj_io.h index 57aa696c43b..c5aade45703 100644 --- a/io/include/pcl/io/obj_io.h +++ b/io/include/pcl/io/obj_io.h @@ -51,7 +51,7 @@ namespace pcl MTLReader (); /** \brief empty destructor */ - virtual ~MTLReader() {} + virtual ~MTLReader() = default; /** \brief Read a MTL file given its full path. * \param[in] filename full path to MTL file @@ -94,9 +94,9 @@ namespace pcl { public: /** \brief empty constructor */ - OBJReader() {} + OBJReader() = default; /** \brief empty destructor */ - ~OBJReader() {} + ~OBJReader() override = default; /** \brief Read a point cloud data header from a FILE file. * * Load only the meta information (number of points, their types, etc), diff --git a/io/include/pcl/io/oni_grabber.h b/io/include/pcl/io/oni_grabber.h index 150ca094e59..c45a41adc0c 100644 --- a/io/include/pcl/io/oni_grabber.h +++ b/io/include/pcl/io/oni_grabber.h @@ -87,7 +87,7 @@ namespace pcl ONIGrabber (const std::string& file_name, bool repeat, bool stream); /** \brief destructor never throws an exception */ - ~ONIGrabber () noexcept; + ~ONIGrabber () noexcept override; /** \brief For devices that are streaming, the streams are started by calling this method. * Trigger-based devices, just trigger the device once for each call of start. diff --git a/io/include/pcl/io/openni_camera/openni_depth_image.h b/io/include/pcl/io/openni_camera/openni_depth_image.h index 582948ab734..40bb47ef269 100644 --- a/io/include/pcl/io/openni_camera/openni_depth_image.h +++ b/io/include/pcl/io/openni_camera/openni_depth_image.h @@ -169,7 +169,7 @@ namespace openni_wrapper , shadow_value_ (shadow_value) , no_sample_value_ (no_sample_value) { } - DepthImage::~DepthImage () noexcept { } + DepthImage::~DepthImage () noexcept = default; const xn::DepthMetaData& DepthImage::getDepthMetaData () const throw () diff --git a/io/include/pcl/io/openni_camera/openni_device_kinect.h b/io/include/pcl/io/openni_camera/openni_device_kinect.h index 549fae20227..00c4d82fe92 100644 --- a/io/include/pcl/io/openni_camera/openni_device_kinect.h +++ b/io/include/pcl/io/openni_camera/openni_device_kinect.h @@ -58,7 +58,7 @@ namespace openni_wrapper friend class OpenNIDriver; public: DeviceKinect (xn::Context& context, const xn::NodeInfo& device_node, const xn::NodeInfo& image_node, const xn::NodeInfo& depth_node, const xn::NodeInfo& ir_node); - ~DeviceKinect () noexcept; + ~DeviceKinect () noexcept override; inline void setDebayeringMethod (const ImageBayerGRBG::DebayeringMethod& debayering_method) noexcept; inline const ImageBayerGRBG::DebayeringMethod& getDebayeringMethod () const throw (); diff --git a/io/include/pcl/io/openni_camera/openni_device_oni.h b/io/include/pcl/io/openni_camera/openni_device_oni.h index 99dbb9dc8f8..31519eb89a0 100644 --- a/io/include/pcl/io/openni_camera/openni_device_oni.h +++ b/io/include/pcl/io/openni_camera/openni_device_oni.h @@ -66,7 +66,7 @@ namespace openni_wrapper using ConstPtr = pcl::shared_ptr; DeviceONI (xn::Context& context, const std::string& file_name, bool repeat = false, bool streaming = true); - ~DeviceONI () noexcept; + ~DeviceONI () noexcept override; void startImageStream () override; void stopImageStream () override; diff --git a/io/include/pcl/io/openni_camera/openni_device_primesense.h b/io/include/pcl/io/openni_camera/openni_device_primesense.h index 0ce07044197..4d22640f8fa 100644 --- a/io/include/pcl/io/openni_camera/openni_device_primesense.h +++ b/io/include/pcl/io/openni_camera/openni_device_primesense.h @@ -59,7 +59,7 @@ class DevicePrimesense : public OpenNIDevice friend class OpenNIDriver; public: DevicePrimesense (xn::Context& context, const xn::NodeInfo& device_node, const xn::NodeInfo& image_node, const xn::NodeInfo& depth_node, const xn::NodeInfo& ir_node); - ~DevicePrimesense () noexcept; + ~DevicePrimesense () noexcept override; //virtual void setImageOutputMode (const XnMapOutputMode& output_mode); protected: diff --git a/io/include/pcl/io/openni_camera/openni_device_xtion.h b/io/include/pcl/io/openni_camera/openni_device_xtion.h index ea0735c4bc1..ad8d71746be 100644 --- a/io/include/pcl/io/openni_camera/openni_device_xtion.h +++ b/io/include/pcl/io/openni_camera/openni_device_xtion.h @@ -61,7 +61,7 @@ namespace openni_wrapper friend class OpenNIDriver; public: DeviceXtionPro (xn::Context& context, const xn::NodeInfo& device_node, const xn::NodeInfo& depth_node, const xn::NodeInfo& ir_node); - ~DeviceXtionPro () noexcept; + ~DeviceXtionPro () noexcept override; //virtual void setImageOutputMode (const XnMapOutputMode& output_mode); protected: diff --git a/io/include/pcl/io/openni_camera/openni_exception.h b/io/include/pcl/io/openni_camera/openni_exception.h index dd65e3f10ee..3f60e759b4d 100644 --- a/io/include/pcl/io/openni_camera/openni_exception.h +++ b/io/include/pcl/io/openni_camera/openni_exception.h @@ -80,7 +80,7 @@ namespace openni_wrapper /** * @brief virtual Destructor that never throws an exception */ - ~OpenNIException () noexcept; + ~OpenNIException () noexcept override; /** * @brief Assignment operator to allow copying the message of another exception variable. diff --git a/io/include/pcl/io/openni_camera/openni_image.h b/io/include/pcl/io/openni_camera/openni_image.h index 8b01ad7aa89..1a3c4b2c67b 100644 --- a/io/include/pcl/io/openni_camera/openni_image.h +++ b/io/include/pcl/io/openni_camera/openni_image.h @@ -173,7 +173,7 @@ namespace openni_wrapper { } - Image::~Image () noexcept { } + Image::~Image () noexcept = default; unsigned Image::getWidth () const throw () diff --git a/io/include/pcl/io/openni_camera/openni_image_bayer_grbg.h b/io/include/pcl/io/openni_camera/openni_image_bayer_grbg.h index ce6130356ee..052387f7d32 100644 --- a/io/include/pcl/io/openni_camera/openni_image_bayer_grbg.h +++ b/io/include/pcl/io/openni_camera/openni_image_bayer_grbg.h @@ -62,7 +62,7 @@ namespace openni_wrapper }; ImageBayerGRBG (pcl::shared_ptr image_meta_data, DebayeringMethod method) noexcept; - ~ImageBayerGRBG () noexcept; + ~ImageBayerGRBG () noexcept override; inline Encoding getEncoding () const override diff --git a/io/include/pcl/io/openni_camera/openni_image_rgb24.h b/io/include/pcl/io/openni_camera/openni_image_rgb24.h index ad17143ff3d..c1950592df0 100644 --- a/io/include/pcl/io/openni_camera/openni_image_rgb24.h +++ b/io/include/pcl/io/openni_camera/openni_image_rgb24.h @@ -57,7 +57,7 @@ namespace openni_wrapper public: ImageRGB24 (pcl::shared_ptr image_meta_data) noexcept; - ~ImageRGB24 () noexcept; + ~ImageRGB24 () noexcept override; inline Encoding getEncoding () const override diff --git a/io/include/pcl/io/openni_camera/openni_image_yuv_422.h b/io/include/pcl/io/openni_camera/openni_image_yuv_422.h index ea9e382efa2..de6009ece9c 100644 --- a/io/include/pcl/io/openni_camera/openni_image_yuv_422.h +++ b/io/include/pcl/io/openni_camera/openni_image_yuv_422.h @@ -56,7 +56,7 @@ namespace openni_wrapper { public: ImageYUV422 (pcl::shared_ptr image_meta_data) noexcept; - ~ImageYUV422 () noexcept; + ~ImageYUV422 () noexcept override; inline Encoding getEncoding () const override diff --git a/io/include/pcl/io/openni_camera/openni_ir_image.h b/io/include/pcl/io/openni_camera/openni_ir_image.h index c98509ffe22..30f02b44d69 100644 --- a/io/include/pcl/io/openni_camera/openni_ir_image.h +++ b/io/include/pcl/io/openni_camera/openni_ir_image.h @@ -75,8 +75,7 @@ IRImage::IRImage (pcl::shared_ptr ir_meta_data) noexcept } IRImage::~IRImage () noexcept -{ -} += default; unsigned IRImage::getWidth () const throw () { diff --git a/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h b/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h index bd8b2751e3d..940b548ad26 100644 --- a/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h +++ b/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h @@ -56,7 +56,7 @@ namespace openni_wrapper ShiftToDepthConverter () : init_(false) {} /** \brief Destructor. */ - virtual ~ShiftToDepthConverter () {}; + virtual ~ShiftToDepthConverter () = default;; /** \brief This method generates a look-up table to convert openni shift values to depth */ diff --git a/io/include/pcl/io/openni_grabber.h b/io/include/pcl/io/openni_grabber.h index bbe1332c080..acfb250ddb7 100644 --- a/io/include/pcl/io/openni_grabber.h +++ b/io/include/pcl/io/openni_grabber.h @@ -108,7 +108,7 @@ namespace pcl const Mode& image_mode = OpenNI_Default_Mode); /** \brief virtual Destructor inherited from the Grabber interface. It never throws. */ - ~OpenNIGrabber () noexcept; + ~OpenNIGrabber () noexcept override; /** \brief Start the data acquisition. */ void diff --git a/io/include/pcl/io/pcd_grabber.h b/io/include/pcl/io/pcd_grabber.h index d97c0867acb..be10528d113 100644 --- a/io/include/pcl/io/pcd_grabber.h +++ b/io/include/pcl/io/pcd_grabber.h @@ -78,7 +78,7 @@ namespace pcl PCDGrabberBase (const std::vector& pcd_files, float frames_per_second, bool repeat); /** \brief Virtual destructor. */ - ~PCDGrabberBase () noexcept; + ~PCDGrabberBase () noexcept override; /** \brief Starts playing the list of PCD files if frames_per_second is > 0. Otherwise it works as a trigger: publishes only the next PCD file in the list. */ void @@ -146,7 +146,7 @@ namespace pcl PCDGrabber (const std::vector& pcd_files, float frames_per_second = 0, bool repeat = false); /** \brief Virtual destructor. */ - ~PCDGrabber () noexcept + ~PCDGrabber () noexcept override { stop (); } diff --git a/io/include/pcl/io/pcd_io.h b/io/include/pcl/io/pcd_io.h index 23f71ef11a4..6cfb5342e25 100644 --- a/io/include/pcl/io/pcd_io.h +++ b/io/include/pcl/io/pcd_io.h @@ -54,9 +54,9 @@ namespace pcl { public: /** Empty constructor */ - PCDReader () {} + PCDReader () = default; /** Empty destructor */ - ~PCDReader () {} + ~PCDReader () override = default; /** \brief Various PCD file versions. * @@ -297,7 +297,7 @@ namespace pcl { public: PCDWriter() : map_synchronization_(false) {} - ~PCDWriter() {} + ~PCDWriter() override = default; /** \brief Set whether mmap() synchornization via msync() is desired before munmap() calls. * Setting this to true could prevent NFS data loss (see diff --git a/io/include/pcl/io/ply/ply_parser.h b/io/include/pcl/io/ply/ply_parser.h index 55aee22f0c9..798866f0717 100644 --- a/io/include/pcl/io/ply/ply_parser.h +++ b/io/include/pcl/io/ply/ply_parser.h @@ -299,7 +299,7 @@ namespace pcl struct property { property (const std::string& name) : name (name) {} - virtual ~property () {} + virtual ~property () = default; virtual bool parse (class ply_parser& ply_parser, format_type format, std::istream& istream) = 0; std::string name; }; diff --git a/io/include/pcl/io/ply_io.h b/io/include/pcl/io/ply_io.h index 58c3e84406d..efbf92fce0f 100644 --- a/io/include/pcl/io/ply_io.h +++ b/io/include/pcl/io/ply_io.h @@ -125,7 +125,7 @@ namespace pcl return (*this); } - ~PLYReader () { delete range_grid_; } + ~PLYReader () override { delete range_grid_; } /** \brief Read a point cloud data header from a PLY file. * * Load only the meta information (number of points, their types, etc), @@ -547,10 +547,10 @@ namespace pcl { public: ///Constructor - PLYWriter () {}; + PLYWriter () = default;; ///Destructor - ~PLYWriter () {}; + ~PLYWriter () override = default;; /** \brief Generate the header of a PLY v.7 file format * \param[in] cloud the point cloud data message diff --git a/io/include/pcl/io/point_cloud_image_extractors.h b/io/include/pcl/io/point_cloud_image_extractors.h index a83e6da1b33..5c8993a0820 100644 --- a/io/include/pcl/io/point_cloud_image_extractors.h +++ b/io/include/pcl/io/point_cloud_image_extractors.h @@ -89,7 +89,7 @@ namespace pcl {} /** \brief Destructor. */ - virtual ~PointCloudImageExtractor () {} + virtual ~PointCloudImageExtractor () = default; /** \brief Obtain the image from the given cloud. * \param[in] cloud organized point cloud to extract image from @@ -167,7 +167,7 @@ namespace pcl } /** \brief Destructor. */ - ~PointCloudImageExtractorWithScaling () {} + ~PointCloudImageExtractorWithScaling () override = default; /** \brief Set scaling method. */ inline void @@ -209,10 +209,10 @@ namespace pcl using ConstPtr = shared_ptr >; /** \brief Constructor. */ - PointCloudImageExtractorFromNormalField () {} + PointCloudImageExtractorFromNormalField () = default; /** \brief Destructor. */ - ~PointCloudImageExtractorFromNormalField () {} + ~PointCloudImageExtractorFromNormalField () override = default; protected: @@ -236,10 +236,10 @@ namespace pcl using ConstPtr = shared_ptr >; /** \brief Constructor. */ - PointCloudImageExtractorFromRGBField () {} + PointCloudImageExtractorFromRGBField () = default; /** \brief Destructor. */ - ~PointCloudImageExtractorFromRGBField () {} + ~PointCloudImageExtractorFromRGBField () override = default; protected: @@ -284,7 +284,7 @@ namespace pcl } /** \brief Destructor. */ - ~PointCloudImageExtractorFromLabelField () {} + ~PointCloudImageExtractorFromLabelField () override = default; /** \brief Set color mapping mode. */ inline void @@ -339,7 +339,7 @@ namespace pcl } /** \brief Destructor. */ - ~PointCloudImageExtractorFromZField () {} + ~PointCloudImageExtractorFromZField () override = default; protected: // Members derived from the base class @@ -381,7 +381,7 @@ namespace pcl } /** \brief Destructor. */ - ~PointCloudImageExtractorFromCurvatureField () {} + ~PointCloudImageExtractorFromCurvatureField () override = default; protected: // Members derived from the base class @@ -423,7 +423,7 @@ namespace pcl } /** \brief Destructor. */ - ~PointCloudImageExtractorFromIntensityField () {} + ~PointCloudImageExtractorFromIntensityField () override = default; protected: // Members derived from the base class diff --git a/io/include/pcl/io/robot_eye_grabber.h b/io/include/pcl/io/robot_eye_grabber.h index 546b0d7d08a..226cbc76f1f 100644 --- a/io/include/pcl/io/robot_eye_grabber.h +++ b/io/include/pcl/io/robot_eye_grabber.h @@ -72,7 +72,7 @@ namespace pcl RobotEyeGrabber (const boost::asio::ip::address& ipAddress, unsigned short port=443); /** \brief virtual Destructor inherited from the Grabber interface. It never throws. */ - ~RobotEyeGrabber () noexcept; + ~RobotEyeGrabber () noexcept override; /** \brief Starts the RobotEye grabber. * The grabber runs on a separate thread, this call will return without blocking. */ diff --git a/io/include/pcl/io/vlp_grabber.h b/io/include/pcl/io/vlp_grabber.h index cf1d9f36749..44ef94dcb19 100644 --- a/io/include/pcl/io/vlp_grabber.h +++ b/io/include/pcl/io/vlp_grabber.h @@ -70,7 +70,7 @@ namespace pcl /** \brief virtual Destructor inherited from the Grabber interface. It never throws. */ - ~VLPGrabber () noexcept; + ~VLPGrabber () noexcept override; /** \brief Obtains the name of this I/O Grabber * \return The name of the grabber diff --git a/io/src/ascii_io.cpp b/io/src/ascii_io.cpp index 4a1971f1a65..2a5380f65b0 100644 --- a/io/src/ascii_io.cpp +++ b/io/src/ascii_io.cpp @@ -79,8 +79,7 @@ pcl::ASCIIReader::ASCIIReader () ////////////////////////////////////////////////////////////////////////////// pcl::ASCIIReader::~ASCIIReader () -{ -} += default; ////////////////////////////////////////////////////////////////////////////// int diff --git a/io/src/ensenso_grabber.cpp b/io/src/ensenso_grabber.cpp index 06cdabadf49..d2e1b6c3940 100644 --- a/io/src/ensenso_grabber.cpp +++ b/io/src/ensenso_grabber.cpp @@ -312,9 +312,9 @@ pcl::EnsensoGrabber::grabSingleCloud (pcl::PointCloud &cloud) con double timestamp; std::vector pointMap; int width, height; - camera_[itmImages][itmRaw][itmLeft].getBinaryDataInfo (0, 0, 0, 0, 0, ×tamp); // Get raw image timestamp - camera_[itmImages][itmPointMap].getBinaryDataInfo (&width, &height, 0, 0, 0, 0); - camera_[itmImages][itmPointMap].getBinaryData (pointMap, 0); + camera_[itmImages][itmRaw][itmLeft].getBinaryDataInfo (nullptr, nullptr, nullptr, nullptr, nullptr, ×tamp); // Get raw image timestamp + camera_[itmImages][itmPointMap].getBinaryDataInfo (&width, &height, nullptr, nullptr, nullptr, nullptr); + camera_[itmImages][itmPointMap].getBinaryData (pointMap, nullptr); // Copy point cloud and convert in meters cloud.header.stamp = getPCLStamp (timestamp); @@ -971,7 +971,7 @@ pcl::EnsensoGrabber::processGrabbing () NxLibCommand (cmdCapture).execute (); double timestamp; - camera_[itmImages][itmRaw][itmLeft].getBinaryDataInfo (0, 0, 0, 0, 0, ×tamp); + camera_[itmImages][itmRaw][itmLeft].getBinaryDataInfo (nullptr, nullptr, nullptr, nullptr, nullptr, ×tamp); // Gather images if (num_slots () > 0 || num_slots () > 0) @@ -995,7 +995,7 @@ pcl::EnsensoGrabber::processGrabbing () if (collected_pattern) { - camera_[itmImages][itmWithOverlay][itmLeft].getBinaryDataInfo (&width, &height, &channels, &bpe, &isFlt, 0); + camera_[itmImages][itmWithOverlay][itmLeft].getBinaryDataInfo (&width, &height, &channels, &bpe, &isFlt, nullptr); images->first.header.stamp = images->second.header.stamp = getPCLStamp (timestamp); images->first.width = images->second.width = width; images->first.height = images->second.height = height; @@ -1003,12 +1003,12 @@ pcl::EnsensoGrabber::processGrabbing () images->second.data.resize (width * height * sizeof(float)); images->first.encoding = images->second.encoding = getOpenCVType (channels, bpe, isFlt); - camera_[itmImages][itmWithOverlay][itmLeft].getBinaryData (images->first.data.data (), images->first.data.size (), 0, 0); - camera_[itmImages][itmWithOverlay][itmRight].getBinaryData (images->second.data.data (), images->second.data.size (), 0, 0); + camera_[itmImages][itmWithOverlay][itmLeft].getBinaryData (images->first.data.data (), images->first.data.size (), nullptr, nullptr); + camera_[itmImages][itmWithOverlay][itmRight].getBinaryData (images->second.data.data (), images->second.data.size (), nullptr, nullptr); } else { - camera_[itmImages][itmRaw][itmLeft].getBinaryDataInfo (&width, &height, &channels, &bpe, &isFlt, 0); + camera_[itmImages][itmRaw][itmLeft].getBinaryDataInfo (&width, &height, &channels, &bpe, &isFlt, nullptr); images->first.header.stamp = images->second.header.stamp = getPCLStamp (timestamp); images->first.width = images->second.width = width; images->first.height = images->second.height = height; @@ -1016,8 +1016,8 @@ pcl::EnsensoGrabber::processGrabbing () images->second.data.resize (width * height * sizeof(float)); images->first.encoding = images->second.encoding = getOpenCVType (channels, bpe, isFlt); - camera_[itmImages][itmRaw][itmLeft].getBinaryData (images->first.data.data (), images->first.data.size (), 0, 0); - camera_[itmImages][itmRaw][itmRight].getBinaryData (images->second.data.data (), images->second.data.size (), 0, 0); + camera_[itmImages][itmRaw][itmLeft].getBinaryData (images->first.data.data (), images->first.data.size (), nullptr, nullptr); + camera_[itmImages][itmRaw][itmRight].getBinaryData (images->second.data.data (), images->second.data.size (), nullptr, nullptr); } } @@ -1033,8 +1033,8 @@ pcl::EnsensoGrabber::processGrabbing () // Get info about the computed point map and copy it into a std::vector std::vector pointMap; int width, height; - camera_[itmImages][itmPointMap].getBinaryDataInfo (&width, &height, 0, 0, 0, 0); - camera_[itmImages][itmPointMap].getBinaryData (pointMap, 0); + camera_[itmImages][itmPointMap].getBinaryDataInfo (&width, &height, nullptr, nullptr, nullptr, nullptr); + camera_[itmImages][itmPointMap].getBinaryData (pointMap, nullptr); // Copy point cloud and convert in meters cloud->header.stamp = getPCLStamp (timestamp); diff --git a/io/src/io_exception.cpp b/io/src/io_exception.cpp index 7b3f57cea88..5e615ec8239 100644 --- a/io/src/io_exception.cpp +++ b/io/src/io_exception.cpp @@ -48,8 +48,7 @@ pcl::io::IOException::IOException (const std::string& function_name, const std:: } pcl::io::IOException::~IOException () noexcept -{ -} += default; pcl::io::IOException& pcl::io::IOException::operator = (const IOException& exception) diff --git a/io/src/openni_camera/openni_driver.cpp b/io/src/openni_camera/openni_driver.cpp index 070c6b810e0..a45811a061e 100644 --- a/io/src/openni_camera/openni_driver.cpp +++ b/io/src/openni_camera/openni_driver.cpp @@ -557,12 +557,7 @@ openni_wrapper::OpenNIDriver::DeviceContext::DeviceContext (const xn::NodeInfo& ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// openni_wrapper::OpenNIDriver::DeviceContext::DeviceContext (const DeviceContext& other) -: device_node (other.device_node) -, image_node (other.image_node) -, depth_node (other.depth_node) -, ir_node (other.ir_node) -, device (other.device) -{ -} + += default; #endif diff --git a/io/src/openni_camera/openni_exception.cpp b/io/src/openni_camera/openni_exception.cpp index 540a71009de..4b164bea20e 100644 --- a/io/src/openni_camera/openni_exception.cpp +++ b/io/src/openni_camera/openni_exception.cpp @@ -55,8 +55,7 @@ OpenNIException::OpenNIException (const std::string& function_name, const std::s } OpenNIException::~OpenNIException () noexcept -{ -} += default; OpenNIException& OpenNIException::operator = (const OpenNIException& exception) noexcept { diff --git a/io/src/openni_camera/openni_image_bayer_grbg.cpp b/io/src/openni_camera/openni_image_bayer_grbg.cpp index b86c9aa340a..eb2de73f910 100644 --- a/io/src/openni_camera/openni_image_bayer_grbg.cpp +++ b/io/src/openni_camera/openni_image_bayer_grbg.cpp @@ -56,8 +56,7 @@ openni_wrapper::ImageBayerGRBG::ImageBayerGRBG (pcl::shared_ptr image_meta_data) noex } ImageRGB24::~ImageRGB24 () noexcept -{ -} += default; void ImageRGB24::fillGrayscale (unsigned width, unsigned height, unsigned char* gray_buffer, unsigned gray_line_step) const { diff --git a/io/src/openni_camera/openni_image_yuv_422.cpp b/io/src/openni_camera/openni_image_yuv_422.cpp index fc57d4f58c1..e74d8c30e1f 100644 --- a/io/src/openni_camera/openni_image_yuv_422.cpp +++ b/io/src/openni_camera/openni_image_yuv_422.cpp @@ -53,8 +53,7 @@ ImageYUV422::ImageYUV422 (pcl::shared_ptr image_meta_data) no } ImageYUV422::~ImageYUV422 () noexcept -{ -} += default; bool ImageYUV422::isResizingSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const { diff --git a/io/src/vlp_grabber.cpp b/io/src/vlp_grabber.cpp index ea15158de62..adcb8b20519 100644 --- a/io/src/vlp_grabber.cpp +++ b/io/src/vlp_grabber.cpp @@ -59,8 +59,7 @@ pcl::VLPGrabber::VLPGrabber (const boost::asio::ip::address& ipAddress, ///////////////////////////////////////////////////////////////////////////// pcl::VLPGrabber::~VLPGrabber () noexcept -{ -} += default; ///////////////////////////////////////////////////////////////////////////// void diff --git a/io/tools/openni_pcd_recorder.cpp b/io/tools/openni_pcd_recorder.cpp index 6d30feecb70..125a5a2e3e1 100644 --- a/io/tools/openni_pcd_recorder.cpp +++ b/io/tools/openni_pcd_recorder.cpp @@ -101,7 +101,7 @@ template class PCDBuffer { public: - PCDBuffer () {} + PCDBuffer () = default; bool pushBack (typename PointCloud::ConstPtr); // thread-save wrapper for push_back() method of ciruclar_buffer diff --git a/kdtree/include/pcl/kdtree/kdtree.h b/kdtree/include/pcl/kdtree/kdtree.h index 5d5e5034f21..25537e0e36b 100644 --- a/kdtree/include/pcl/kdtree/kdtree.h +++ b/kdtree/include/pcl/kdtree/kdtree.h @@ -121,7 +121,7 @@ namespace pcl } /** \brief Destructor for KdTree. Deletes all allocated data arrays and destroys the kd-tree structures. */ - virtual ~KdTree () {}; + virtual ~KdTree () = default;; /** \brief Search for k-nearest neighbors for the given query point. * \param[in] p_q the given query point diff --git a/kdtree/include/pcl/kdtree/kdtree_flann.h b/kdtree/include/pcl/kdtree/kdtree_flann.h index bf053ac0b65..0dc22fcbf1d 100644 --- a/kdtree/include/pcl/kdtree/kdtree_flann.h +++ b/kdtree/include/pcl/kdtree/kdtree_flann.h @@ -128,7 +128,7 @@ namespace pcl /** \brief Destructor for KdTreeFLANN. * Deletes all allocated data arrays and destroys the kd-tree structures. */ - ~KdTreeFLANN () + ~KdTreeFLANN () override { cleanup (); } diff --git a/keypoints/include/pcl/keypoints/agast_2d.h b/keypoints/include/pcl/keypoints/agast_2d.h index 76e5c3f013a..1a2fc69a742 100644 --- a/keypoints/include/pcl/keypoints/agast_2d.h +++ b/keypoints/include/pcl/keypoints/agast_2d.h @@ -85,7 +85,7 @@ namespace pcl {} /** \brief Destructor. */ - virtual ~AbstractAgastDetector () {} + virtual ~AbstractAgastDetector () = default; /** \brief Detects corner points. * \param intensity_data @@ -285,7 +285,7 @@ namespace pcl } /** \brief Destructor. */ - ~AgastDetector7_12s () {} + ~AgastDetector7_12s () override = default; /** \brief Computes corner score. * \param im @@ -356,7 +356,7 @@ namespace pcl } /** \brief Destructor. */ - ~AgastDetector5_8 () {} + ~AgastDetector5_8 () override = default; /** \brief Computes corner score. * \param im @@ -427,7 +427,7 @@ namespace pcl } /** \brief Destructor. */ - ~OastDetector9_16 () {} + ~OastDetector9_16 () override = default; /** \brief Computes corner score. * \param im @@ -579,9 +579,8 @@ namespace pcl } /** \brief Destructor. */ - ~AgastKeypoint2DBase () - { - } + ~AgastKeypoint2DBase () override + = default; /** \brief Sets the threshold for corner detection. * \param[in] threshold the threshold used for corner detection. @@ -740,8 +739,7 @@ namespace pcl /** \brief Destructor. */ ~AgastKeypoint2D () - { - } + = default; protected: /** \brief Detects the keypoints. @@ -790,9 +788,8 @@ namespace pcl } /** \brief Destructor. */ - ~AgastKeypoint2D () - { - } + ~AgastKeypoint2D () override + = default; protected: /** \brief Detects the keypoints. diff --git a/keypoints/include/pcl/keypoints/brisk_2d.h b/keypoints/include/pcl/keypoints/brisk_2d.h index fdec9424c6a..e94a4565304 100644 --- a/keypoints/include/pcl/keypoints/brisk_2d.h +++ b/keypoints/include/pcl/keypoints/brisk_2d.h @@ -98,8 +98,7 @@ namespace pcl /** \brief Destructor. */ ~BriskKeypoint2D () - { - } + = default; /** \brief Sets the threshold for corner detection. * \param[in] threshold the threshold used for corner detection. diff --git a/keypoints/include/pcl/keypoints/harris_3d.h b/keypoints/include/pcl/keypoints/harris_3d.h index e59c76443cc..08ac7b02a91 100644 --- a/keypoints/include/pcl/keypoints/harris_3d.h +++ b/keypoints/include/pcl/keypoints/harris_3d.h @@ -94,7 +94,7 @@ namespace pcl } /** \brief Empty destructor */ - ~HarrisKeypoint3D () {} + ~HarrisKeypoint3D () = default; /** \brief Provide a pointer to the input dataset * \param[in] cloud the const boost shared pointer to a PointCloud message diff --git a/keypoints/include/pcl/keypoints/harris_6d.h b/keypoints/include/pcl/keypoints/harris_6d.h index 6bcb59e064f..91ba241a8a2 100644 --- a/keypoints/include/pcl/keypoints/harris_6d.h +++ b/keypoints/include/pcl/keypoints/harris_6d.h @@ -85,7 +85,7 @@ namespace pcl } /** \brief Empty destructor */ - virtual ~HarrisKeypoint6D () {} + virtual ~HarrisKeypoint6D () = default; /** * @brief set the radius for normal estimation and non maxima supression. diff --git a/keypoints/include/pcl/keypoints/keypoint.h b/keypoints/include/pcl/keypoints/keypoint.h index 02381195319..56f96c3065a 100644 --- a/keypoints/include/pcl/keypoints/keypoint.h +++ b/keypoints/include/pcl/keypoints/keypoint.h @@ -83,7 +83,7 @@ namespace pcl {}; /** \brief Empty destructor */ - ~Keypoint () {} + ~Keypoint () override = default; /** \brief Provide a pointer to the input dataset that we need to estimate features at every point for. * \param cloud the const boost shared pointer to a PointCloud message diff --git a/keypoints/include/pcl/keypoints/narf_keypoint.h b/keypoints/include/pcl/keypoints/narf_keypoint.h index ef07ae6ab22..d9a4121afb2 100644 --- a/keypoints/include/pcl/keypoints/narf_keypoint.h +++ b/keypoints/include/pcl/keypoints/narf_keypoint.h @@ -117,7 +117,7 @@ class PCL_EXPORTS NarfKeypoint : public Keypoint // =====CONSTRUCTOR & DESTRUCTOR===== NarfKeypoint (RangeImageBorderExtractor* range_image_border_extractor=nullptr, float support_size=-1.0f); - ~NarfKeypoint (); + ~NarfKeypoint () override; // =====PUBLIC METHODS===== //! Erase all data calculated for the current range image diff --git a/keypoints/include/pcl/keypoints/susan.h b/keypoints/include/pcl/keypoints/susan.h index 9698f6433f5..c23af18edb2 100644 --- a/keypoints/include/pcl/keypoints/susan.h +++ b/keypoints/include/pcl/keypoints/susan.h @@ -103,7 +103,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SUSANKeypoint () {} + ~SUSANKeypoint () = default; /** \brief set the radius for normal estimation and non maxima supression. * \param[in] radius diff --git a/keypoints/src/brisk_2d.cpp b/keypoints/src/brisk_2d.cpp index a3c797f024f..e40905022f2 100644 --- a/keypoints/src/brisk_2d.cpp +++ b/keypoints/src/brisk_2d.cpp @@ -65,8 +65,7 @@ pcl::keypoints::brisk::ScaleSpace::ScaleSpace (int octaves) ///////////////////////////////////////////////////////////////////////////////////////// pcl::keypoints::brisk::ScaleSpace::~ScaleSpace () -{ -} += default; ///////////////////////////////////////////////////////////////////////////////////////// // construct the image pyramids diff --git a/ml/include/pcl/ml/branch_estimator.h b/ml/include/pcl/ml/branch_estimator.h index 1338f39ef1a..30af64bbf96 100644 --- a/ml/include/pcl/ml/branch_estimator.h +++ b/ml/include/pcl/ml/branch_estimator.h @@ -50,7 +50,7 @@ namespace pcl { class PCL_EXPORTS BranchEstimator { public: /** Destructor. */ - virtual ~BranchEstimator() {} + virtual ~BranchEstimator() = default; /** Returns the number of branches the corresponding tree has. */ virtual std::size_t @@ -75,9 +75,9 @@ class PCL_EXPORTS BranchEstimator { class PCL_EXPORTS BinaryTreeThresholdBasedBranchEstimator : public BranchEstimator { public: /** Constructor. */ - inline BinaryTreeThresholdBasedBranchEstimator() {} + inline BinaryTreeThresholdBasedBranchEstimator() = default; /** Destructor. */ - inline ~BinaryTreeThresholdBasedBranchEstimator() {} + inline ~BinaryTreeThresholdBasedBranchEstimator() override = default; /** Returns the number of branches the corresponding tree has. */ inline std::size_t @@ -109,9 +109,9 @@ class PCL_EXPORTS BinaryTreeThresholdBasedBranchEstimator : public BranchEstimat class PCL_EXPORTS TernaryTreeMissingDataBranchEstimator : public BranchEstimator { public: /** Constructor. */ - inline TernaryTreeMissingDataBranchEstimator() {} + inline TernaryTreeMissingDataBranchEstimator() = default; /** Destructor. */ - inline ~TernaryTreeMissingDataBranchEstimator() {} + inline ~TernaryTreeMissingDataBranchEstimator() override = default; /** \brief Returns the number of branches the corresponding tree has. */ inline std::size_t diff --git a/ml/include/pcl/ml/dt/decision_forest.h b/ml/include/pcl/ml/dt/decision_forest.h index 02cc485a8b7..861c05e424b 100644 --- a/ml/include/pcl/ml/dt/decision_forest.h +++ b/ml/include/pcl/ml/dt/decision_forest.h @@ -51,10 +51,10 @@ class PCL_EXPORTS DecisionForest : public std::vector>; /** Constructor. */ - DecisionTreeTrainerDataProvider() {} + DecisionTreeTrainerDataProvider() = default; /** Destructor. */ - ~DecisionTreeTrainerDataProvider() {} + ~DecisionTreeTrainerDataProvider() = default; /** Virtual function called to obtain training examples and labels before * training a specific tree */ diff --git a/ml/include/pcl/ml/feature_handler.h b/ml/include/pcl/ml/feature_handler.h index 86be9fe4a61..112af1a8579 100644 --- a/ml/include/pcl/ml/feature_handler.h +++ b/ml/include/pcl/ml/feature_handler.h @@ -49,7 +49,7 @@ template class PCL_EXPORTS FeatureHandler { public: /** Destructor. */ - virtual ~FeatureHandler(){}; + virtual ~FeatureHandler()= default;; /** Creates random features. * diff --git a/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp b/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp index 61243ccc955..62c68dfecfe 100644 --- a/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp +++ b/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp @@ -62,7 +62,7 @@ template pcl::DecisionForestEvaluator:: ~DecisionForestEvaluator() -{} += default; template DecisionForestTrainer:: ~DecisionForestTrainer() -{} += default; template DecisionTreeEvaluator:: DecisionTreeEvaluator() -{} += default; template DecisionTreeEvaluator:: ~DecisionTreeEvaluator() -{} += default; template DecisionTreeTrainer:: ~DecisionTreeTrainer() -{} += default; template & out, diff --git a/ml/include/pcl/ml/point_xy_32f.h b/ml/include/pcl/ml/point_xy_32f.h index 7549a2952e7..b4cd634dcab 100644 --- a/ml/include/pcl/ml/point_xy_32f.h +++ b/ml/include/pcl/ml/point_xy_32f.h @@ -49,7 +49,7 @@ class PCL_EXPORTS PointXY32f { /** Constructor. */ inline PointXY32f() : x(0.0f), y(0.0f) {} /** Destructor. */ - inline virtual ~PointXY32f() {} + inline virtual ~PointXY32f() = default; /** Serializes the point to the specified stream. * diff --git a/ml/include/pcl/ml/point_xy_32i.h b/ml/include/pcl/ml/point_xy_32i.h index 018c030020a..c1ca352a38d 100644 --- a/ml/include/pcl/ml/point_xy_32i.h +++ b/ml/include/pcl/ml/point_xy_32i.h @@ -50,7 +50,7 @@ class PCL_EXPORTS PointXY32i { inline PointXY32i() : x(0), y(0) {} /** Destructor. */ - inline virtual ~PointXY32i() {} + inline virtual ~PointXY32i() = default; /** Serializes the point to the specified stream. * diff --git a/ml/include/pcl/ml/stats_estimator.h b/ml/include/pcl/ml/stats_estimator.h index a6078162c40..d9cee65edde 100644 --- a/ml/include/pcl/ml/stats_estimator.h +++ b/ml/include/pcl/ml/stats_estimator.h @@ -50,7 +50,7 @@ class PCL_EXPORTS StatsEstimator { public: /** Destructor. */ - virtual ~StatsEstimator(){}; + virtual ~StatsEstimator()= default;; /** Returns the number of brances a node can have (e.g. a binary tree has 2). */ virtual std::size_t diff --git a/ml/src/kmeans.cpp b/ml/src/kmeans.cpp index 32c5aeb5d5f..dea89c03934 100644 --- a/ml/src/kmeans.cpp +++ b/ml/src/kmeans.cpp @@ -58,7 +58,7 @@ pcl::Kmeans::Kmeans(unsigned int num_points, unsigned int num_dimensions) {} ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -pcl::Kmeans::~Kmeans() {} +pcl::Kmeans::~Kmeans() = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/ml/src/svm.cpp b/ml/src/svm.cpp index ea394254851..9ccc508ebfb 100644 --- a/ml/src/svm.cpp +++ b/ml/src/svm.cpp @@ -302,14 +302,14 @@ class QMatrix { get_QD() const = 0; virtual void swap_index(int i, int j) const = 0; - virtual ~QMatrix() {} + virtual ~QMatrix() = default; }; class Kernel : public QMatrix { public: Kernel(int l, svm_node* const* x, const svm_parameter& param); - ~Kernel(); + ~Kernel() override; static double k_function(const svm_node* x, const svm_node* y, const svm_parameter& param); @@ -520,9 +520,9 @@ Kernel::k_function(const svm_node* x, const svm_node* y, const svm_parameter& pa class Solver { public: - Solver(){}; + Solver()= default;; - virtual ~Solver(){}; + virtual ~Solver()= default;; struct SolutionInfo { double obj; @@ -1173,7 +1173,7 @@ Solver::calculate_rho() class Solver_NU : public Solver { public: - Solver_NU() {} + Solver_NU() = default; void Solve(int l, @@ -1477,7 +1477,7 @@ class SVC_Q : public Kernel { swap(QD[i], QD[j]); } - ~SVC_Q() + ~SVC_Q() override { delete[] y; delete cache; @@ -1531,7 +1531,7 @@ class ONE_CLASS_Q : public Kernel { swap(QD[i], QD[j]); } - ~ONE_CLASS_Q() + ~ONE_CLASS_Q() override { delete cache; delete[] QD; @@ -1607,7 +1607,7 @@ class SVR_Q : public Kernel { return QD; } - ~SVR_Q() + ~SVR_Q() override { delete cache; delete[] sign; diff --git a/octree/include/pcl/octree/octree2buf_base.h b/octree/include/pcl/octree/octree2buf_base.h index 632057d1664..1a8a0693db0 100644 --- a/octree/include/pcl/octree/octree2buf_base.h +++ b/octree/include/pcl/octree/octree2buf_base.h @@ -77,7 +77,7 @@ class BufferedBranchNode : public OctreeNode { } /** \brief Empty constructor. */ - ~BufferedBranchNode() {} + ~BufferedBranchNode() override = default; /** \brief Method to perform a deep copy of the octree */ BufferedBranchNode* diff --git a/octree/include/pcl/octree/octree_nodes.h b/octree/include/pcl/octree/octree_nodes.h index b1599a783d4..6eac8e9b7eb 100644 --- a/octree/include/pcl/octree/octree_nodes.h +++ b/octree/include/pcl/octree/octree_nodes.h @@ -57,9 +57,9 @@ enum node_type_t { BRANCH_NODE, LEAF_NODE }; */ class PCL_EXPORTS OctreeNode { public: - OctreeNode() {} + OctreeNode() = default; - virtual ~OctreeNode() {} + virtual ~OctreeNode() = default; /** \brief Pure virtual method for receiving the type of octree node (branch or leaf) */ virtual node_type_t @@ -90,7 +90,7 @@ class OctreeLeafNode : public OctreeNode { /** \brief Empty deconstructor. */ - ~OctreeLeafNode() {} + ~OctreeLeafNode() override = default; /** \brief Method to perform a deep copy of the octree */ OctreeLeafNode* @@ -216,7 +216,7 @@ class OctreeBranchNode : public OctreeNode { /** \brief Empty deconstructor. */ - ~OctreeBranchNode() {} + ~OctreeBranchNode() override = default; /** \brief Access operator. * \param child_idx_arg: index to child node diff --git a/octree/include/pcl/octree/octree_pointcloud_adjacency_container.h b/octree/include/pcl/octree/octree_pointcloud_adjacency_container.h index 16f257cdf97..b13dedac30c 100644 --- a/octree/include/pcl/octree/octree_pointcloud_adjacency_container.h +++ b/octree/include/pcl/octree/octree_pointcloud_adjacency_container.h @@ -82,7 +82,7 @@ class OctreePointCloudAdjacencyContainer : public OctreeContainerBase { OctreePointCloudAdjacencyContainer() : OctreeContainerBase() { this->reset(); } /** \brief Empty class deconstructor. */ - ~OctreePointCloudAdjacencyContainer() {} + ~OctreePointCloudAdjacencyContainer() override = default; /** \brief Returns the number of neighbors this leaf has * \returns number of neighbors diff --git a/octree/include/pcl/octree/octree_pointcloud_density.h b/octree/include/pcl/octree/octree_pointcloud_density.h index 19e97d045d1..003395b29c0 100644 --- a/octree/include/pcl/octree/octree_pointcloud_density.h +++ b/octree/include/pcl/octree/octree_pointcloud_density.h @@ -53,7 +53,7 @@ class OctreePointCloudDensityContainer : public OctreeContainerBase { OctreePointCloudDensityContainer() : point_counter_(0) {} /** \brief Empty class deconstructor. */ - ~OctreePointCloudDensityContainer() {} + ~OctreePointCloudDensityContainer() override = default; /** \brief deep copy function */ virtual OctreePointCloudDensityContainer* @@ -126,7 +126,7 @@ class OctreePointCloudDensity /** \brief Empty class deconstructor. */ - ~OctreePointCloudDensity() {} + ~OctreePointCloudDensity() = default; /** \brief Get the amount of points within a leaf node voxel which is addressed by a * point diff --git a/octree/include/pcl/octree/octree_pointcloud_occupancy.h b/octree/include/pcl/octree/octree_pointcloud_occupancy.h index 71884cdcd41..52fe76f211b 100644 --- a/octree/include/pcl/octree/octree_pointcloud_occupancy.h +++ b/octree/include/pcl/octree/octree_pointcloud_occupancy.h @@ -94,7 +94,7 @@ class OctreePointCloudOccupancy /** \brief Empty class constructor. */ - ~OctreePointCloudOccupancy() {} + ~OctreePointCloudOccupancy() = default; /** \brief Set occupied voxel at point. * \param point_arg: input point diff --git a/octree/include/pcl/octree/octree_pointcloud_pointvector.h b/octree/include/pcl/octree/octree_pointcloud_pointvector.h index 47cf80768ca..8c4ae9f267e 100644 --- a/octree/include/pcl/octree/octree_pointcloud_pointvector.h +++ b/octree/include/pcl/octree/octree_pointcloud_pointvector.h @@ -80,7 +80,7 @@ class OctreePointCloudPointVector {} /** \brief Empty class constructor. */ - ~OctreePointCloudPointVector() {} + ~OctreePointCloudPointVector() = default; }; } // namespace octree } // namespace pcl diff --git a/octree/include/pcl/octree/octree_pointcloud_singlepoint.h b/octree/include/pcl/octree/octree_pointcloud_singlepoint.h index a307bc890b1..d154c05e8a3 100644 --- a/octree/include/pcl/octree/octree_pointcloud_singlepoint.h +++ b/octree/include/pcl/octree/octree_pointcloud_singlepoint.h @@ -80,7 +80,7 @@ class OctreePointCloudSinglePoint {} /** \brief Empty class constructor. */ - ~OctreePointCloudSinglePoint() {} + ~OctreePointCloudSinglePoint() = default; }; } // namespace octree diff --git a/octree/include/pcl/octree/octree_pointcloud_voxelcentroid.h b/octree/include/pcl/octree/octree_pointcloud_voxelcentroid.h index 1207db8ec99..da0de0a0a3f 100644 --- a/octree/include/pcl/octree/octree_pointcloud_voxelcentroid.h +++ b/octree/include/pcl/octree/octree_pointcloud_voxelcentroid.h @@ -55,7 +55,7 @@ class OctreePointCloudVoxelCentroidContainer : public OctreeContainerBase { OctreePointCloudVoxelCentroidContainer() { this->reset(); } /** \brief Empty class deconstructor. */ - ~OctreePointCloudVoxelCentroidContainer() {} + ~OctreePointCloudVoxelCentroidContainer() override = default; /** \brief deep copy function */ virtual OctreePointCloudVoxelCentroidContainer* @@ -150,7 +150,7 @@ class OctreePointCloudVoxelCentroid /** \brief Empty class deconstructor. */ - ~OctreePointCloudVoxelCentroid() {} + ~OctreePointCloudVoxelCentroid() override = default; /** \brief Add DataT object to leaf node at octree key. * \param pointIdx_arg diff --git a/outofcore/include/pcl/outofcore/cJSON.h b/outofcore/include/pcl/outofcore/cJSON.h index d8d6943f06d..04630d17122 100644 --- a/outofcore/include/pcl/outofcore/cJSON.h +++ b/outofcore/include/pcl/outofcore/cJSON.h @@ -44,23 +44,37 @@ extern "C" #define cJSON_IsReference 256 /* The cJSON structure: */ -typedef struct cJSON { +using cJSON = struct cJSON { + struct cJSON *next,*prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */ + struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ + + int type; /* The type of the item, as above. */ + + char *valuestring; /* The item's string, if type==cJSON_String */ + int valueint; /* The item's number, if type==cJSON_Number */ + double valuedouble; /* The item's number, if type==cJSON_Number */ + + char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ -} cJSON; -typedef struct cJSON_Hooks { +}; + +using cJSON_Hooks = struct cJSON_Hooks { + void *(*malloc_fn)(std::size_t sz); + void (*free_fn)(void *ptr); -} cJSON_Hooks; + +}; /* Supply malloc, realloc and free functions to cJSON */ PCLAPI(void) cJSON_InitHooks(cJSON_Hooks* hooks); diff --git a/outofcore/include/pcl/outofcore/impl/lru_cache.hpp b/outofcore/include/pcl/outofcore/impl/lru_cache.hpp index a5c29e91b70..741dd492a88 100644 --- a/outofcore/include/pcl/outofcore/impl/lru_cache.hpp +++ b/outofcore/include/pcl/outofcore/impl/lru_cache.hpp @@ -20,7 +20,7 @@ class LRUCacheItem } virtual - ~LRUCacheItem () { } + ~LRUCacheItem () = default; T item; std::size_t timestamp; diff --git a/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp b/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp index 880cd2d3b8e..2f09d5ac0a1 100644 --- a/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp +++ b/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp @@ -55,8 +55,7 @@ namespace pcl template OutofcoreBreadthFirstIterator::~OutofcoreBreadthFirstIterator () - { - } + = default; //////////////////////////////////////////////////////////////////////////////// diff --git a/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp b/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp index c3608ffaaa4..00ea7721dcf 100644 --- a/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp +++ b/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp @@ -58,8 +58,7 @@ namespace pcl template OutofcoreDepthFirstIterator::~OutofcoreDepthFirstIterator () - { - } + = default; //////////////////////////////////////////////////////////////////////////////// diff --git a/outofcore/include/pcl/outofcore/metadata.h b/outofcore/include/pcl/outofcore/metadata.h index dfe0694c689..95022dff57e 100644 --- a/outofcore/include/pcl/outofcore/metadata.h +++ b/outofcore/include/pcl/outofcore/metadata.h @@ -61,12 +61,11 @@ namespace pcl /** \brief Empty constructor */ OutofcoreAbstractMetadata () - { - } + = default; virtual ~OutofcoreAbstractMetadata () - {} + = default; /** \brief Write the metadata in the on-disk format, e.g. JSON. */ virtual void diff --git a/outofcore/include/pcl/outofcore/octree_abstract_node_container.h b/outofcore/include/pcl/outofcore/octree_abstract_node_container.h index 911be6c6d01..5d0ec0be05d 100644 --- a/outofcore/include/pcl/outofcore/octree_abstract_node_container.h +++ b/outofcore/include/pcl/outofcore/octree_abstract_node_container.h @@ -61,7 +61,7 @@ namespace pcl OutofcoreAbstractNodeContainer (const boost::filesystem::path&) {} virtual - ~OutofcoreAbstractNodeContainer () {} + ~OutofcoreAbstractNodeContainer () = default; virtual void insertRange (const PointT* start, const std::uint64_t count)=0; diff --git a/outofcore/include/pcl/outofcore/octree_base_node.h b/outofcore/include/pcl/outofcore/octree_base_node.h index c65d8491d19..3a0dc45ac3c 100644 --- a/outofcore/include/pcl/outofcore/octree_base_node.h +++ b/outofcore/include/pcl/outofcore/octree_base_node.h @@ -129,7 +129,7 @@ namespace pcl /** \brief Will recursively delete all children calling recFreeChildrein */ - ~OutofcoreOctreeBaseNode (); + ~OutofcoreOctreeBaseNode () override; //query /** \brief gets the minimum and maximum corner of the bounding box represented by this node diff --git a/outofcore/include/pcl/outofcore/octree_disk_container.h b/outofcore/include/pcl/outofcore/octree_disk_container.h index 70c8083c040..9e70ce7e1d1 100644 --- a/outofcore/include/pcl/outofcore/octree_disk_container.h +++ b/outofcore/include/pcl/outofcore/octree_disk_container.h @@ -94,7 +94,7 @@ namespace pcl OutofcoreOctreeDiskContainer (const boost::filesystem::path &dir); /** \brief flushes write buffer, then frees memory */ - ~OutofcoreOctreeDiskContainer (); + ~OutofcoreOctreeDiskContainer () override; /** \brief provides random access to points based on a linear index */ diff --git a/outofcore/include/pcl/outofcore/outofcore_base_data.h b/outofcore/include/pcl/outofcore/outofcore_base_data.h index 7b2123f44ba..f9b052ea908 100644 --- a/outofcore/include/pcl/outofcore/outofcore_base_data.h +++ b/outofcore/include/pcl/outofcore/outofcore_base_data.h @@ -106,7 +106,7 @@ namespace pcl */ OutofcoreOctreeBaseMetadata (const boost::filesystem::path& path_arg); /** \brief Default destructor*/ - ~OutofcoreOctreeBaseMetadata (); + ~OutofcoreOctreeBaseMetadata () override; /** \brief Copy constructor */ OutofcoreOctreeBaseMetadata (const OutofcoreOctreeBaseMetadata& orig); diff --git a/outofcore/include/pcl/outofcore/outofcore_breadth_first_iterator.h b/outofcore/include/pcl/outofcore/outofcore_breadth_first_iterator.h index 86d84297570..a32aecf41b9 100644 --- a/outofcore/include/pcl/outofcore/outofcore_breadth_first_iterator.h +++ b/outofcore/include/pcl/outofcore/outofcore_breadth_first_iterator.h @@ -65,7 +65,7 @@ namespace pcl OutofcoreBreadthFirstIterator (OctreeDisk& octree_arg); - ~OutofcoreBreadthFirstIterator (); + ~OutofcoreBreadthFirstIterator () override; OutofcoreBreadthFirstIterator& operator++ (); diff --git a/outofcore/include/pcl/outofcore/outofcore_depth_first_iterator.h b/outofcore/include/pcl/outofcore/outofcore_depth_first_iterator.h index d175b4a515a..5d5210cd3c5 100644 --- a/outofcore/include/pcl/outofcore/outofcore_depth_first_iterator.h +++ b/outofcore/include/pcl/outofcore/outofcore_depth_first_iterator.h @@ -63,7 +63,7 @@ namespace pcl OutofcoreDepthFirstIterator (OctreeDisk& octree_arg); - ~OutofcoreDepthFirstIterator (); + ~OutofcoreDepthFirstIterator () override; OutofcoreDepthFirstIterator& operator++ (); diff --git a/outofcore/include/pcl/outofcore/outofcore_iterator_base.h b/outofcore/include/pcl/outofcore/outofcore_iterator_base.h index a1047c66bcd..a4fe9cdf294 100644 --- a/outofcore/include/pcl/outofcore/outofcore_iterator_base.h +++ b/outofcore/include/pcl/outofcore/outofcore_iterator_base.h @@ -80,8 +80,7 @@ namespace pcl virtual ~OutofcoreIteratorBase () - { - } + = default; OutofcoreIteratorBase (const OutofcoreIteratorBase& src) : octree_ (src.octree_), currentNode_ (src.currentNode_) diff --git a/outofcore/include/pcl/outofcore/visualization/geometry.h b/outofcore/include/pcl/outofcore/visualization/geometry.h index 2ca3997d6aa..66e67e353c7 100644 --- a/outofcore/include/pcl/outofcore/visualization/geometry.h +++ b/outofcore/include/pcl/outofcore/visualization/geometry.h @@ -24,7 +24,7 @@ class Geometry : public Object public: - ~Geometry () { } + ~Geometry () override = default; public: diff --git a/outofcore/include/pcl/outofcore/visualization/grid.h b/outofcore/include/pcl/outofcore/visualization/grid.h index 052abf07742..5f86360f683 100644 --- a/outofcore/include/pcl/outofcore/visualization/grid.h +++ b/outofcore/include/pcl/outofcore/visualization/grid.h @@ -24,7 +24,7 @@ class Grid : public Object // Operators // ----------------------------------------------------------------------------- Grid (std::string name, int size = 10, double spacing = 1.0); - ~Grid () { } + ~Grid () override = default; // Accessors // ----------------------------------------------------------------------------- diff --git a/outofcore/include/pcl/outofcore/visualization/object.h b/outofcore/include/pcl/outofcore/visualization/object.h index dfa121376da..9703c6c024e 100644 --- a/outofcore/include/pcl/outofcore/visualization/object.h +++ b/outofcore/include/pcl/outofcore/visualization/object.h @@ -24,7 +24,7 @@ class Object Object (std::string name); virtual - ~Object () { } + ~Object () = default; // Accessors diff --git a/outofcore/src/outofcore_node_data.cpp b/outofcore/src/outofcore_node_data.cpp index e3eb4c94ca5..a54fd4734b5 100644 --- a/outofcore/src/outofcore_node_data.cpp +++ b/outofcore/src/outofcore_node_data.cpp @@ -61,8 +61,7 @@ namespace pcl //////////////////////////////////////////////////////////////////////////////// OutofcoreOctreeNodeMetadata::~OutofcoreOctreeNodeMetadata () - { - } + = default; //////////////////////////////////////////////////////////////////////////////// diff --git a/outofcore/src/visualization/scene.cpp b/outofcore/src/visualization/scene.cpp index d5c81ad7c2f..de090b3c9ef 100644 --- a/outofcore/src/visualization/scene.cpp +++ b/outofcore/src/visualization/scene.cpp @@ -7,9 +7,7 @@ Scene* Scene::instance_ = nullptr; Scene::Scene () -{ - -} += default; // Accessors - Cameras // ----------------------------------------------------------------------------- diff --git a/people/include/pcl/people/impl/person_classifier.hpp b/people/include/pcl/people/impl/person_classifier.hpp index efce6bfc15e..4b0b6ed07cc 100644 --- a/people/include/pcl/people/impl/person_classifier.hpp +++ b/people/include/pcl/people/impl/person_classifier.hpp @@ -44,10 +44,10 @@ #define PCL_PEOPLE_PERSON_CLASSIFIER_HPP_ template -pcl::people::PersonClassifier::PersonClassifier () {} +pcl::people::PersonClassifier::PersonClassifier () = default; template -pcl::people::PersonClassifier::~PersonClassifier () {} +pcl::people::PersonClassifier::~PersonClassifier () = default; template bool pcl::people::PersonClassifier::loadSVMFromFile (std::string svm_filename) diff --git a/people/src/hog.cpp b/people/src/hog.cpp index bc5cf63d507..5e7fbf3f20b 100644 --- a/people/src/hog.cpp +++ b/people/src/hog.cpp @@ -64,7 +64,7 @@ pcl::people::HOG::HOG () } /** \brief Destructor. */ -pcl::people::HOG::~HOG () {} +pcl::people::HOG::~HOG () = default; void pcl::people::HOG::gradMag( float *I, int h, int w, int d, float *M, float *O ) const diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh b/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh index 43e80f49e8d..7550fd697a8 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh @@ -51,7 +51,7 @@ namespace mets { class solution_recorder { public: /// @brief Default ctor. - solution_recorder() {} + solution_recorder() = default; /// @brief Unimplemented copy ctor. solution_recorder(const solution_recorder&); /// @brief Unimplemented assignment operator. @@ -109,9 +109,9 @@ namespace mets { abstract_search& operator==(const abstract_search&); /// @brief Virtual destructor. - virtual - ~abstract_search() - { }; + + ~abstract_search() override + = default;; enum { /// @brief We just made a move. @@ -220,14 +220,14 @@ namespace mets { /// @brief Accept is called at the end of each iteration for an /// opportunity to record the best solution found during the /// search. - bool accept(const feasible_solution& sol); + bool accept(const feasible_solution& sol) override; /// @brief Returns the best solution found since the beginning. const evaluable_solution& best_seen() const { return best_ever_m; } /// @brief Best cost seen. - gol_type best_cost() const + gol_type best_cost() const override { return best_ever_m.cost_function(); } protected: /// @brief Records the best solution @@ -255,7 +255,7 @@ namespace mets { /// @brief Virtual destructor virtual ~search_listener() - { } + = default; /// @brief This is the callback method called by searches /// when a move, an improvement or something else happens @@ -336,7 +336,7 @@ namespace mets { } inline mets::solution_recorder::~solution_recorder() -{ } += default; inline bool mets::best_ever_solution::accept(const mets::feasible_solution& sol) diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/model.hh b/recognition/include/pcl/recognition/3rdparty/metslib/model.hh index 6d9a35e6288..ed8550f3231 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/model.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/model.hh @@ -79,7 +79,7 @@ namespace mets { class clonable { public: virtual - ~clonable() {}; + ~clonable() = default;; virtual clonable* clone() const = 0; }; @@ -88,7 +88,7 @@ namespace mets { class hashable { public: virtual - ~hashable() {}; + ~hashable() = default;; virtual std::size_t hash() const = 0; }; @@ -97,7 +97,7 @@ namespace mets { class copyable { public: virtual - ~copyable() {}; + ~copyable() = default;; virtual void copy_from(const copyable&) = 0; }; @@ -106,7 +106,7 @@ namespace mets { class printable { public: virtual - ~printable() {} + ~printable() = default; virtual void print(std::ostream& /*os*/) const { }; }; @@ -137,7 +137,7 @@ namespace mets { /// @brief Virtual dtor. virtual ~feasible_solution() - { } + = default; }; @@ -195,7 +195,7 @@ namespace mets { /// permutation_problem::copy_from in the overriding code. /// /// @param other the problem to copy from - void copy_from(const copyable& other); + void copy_from(const copyable& other) override; /// @brief: Compute cost of the whole solution. /// @@ -227,7 +227,7 @@ namespace mets { /// implementation provided returns the protected /// mets::permutation_problem::cost_m member variable. Do not /// override unless you know what you are doing. - gol_type cost_function() const + gol_type cost_function() const override { return cost_m; } /// @brief Updates the cost with the one computed by the subclass. @@ -312,7 +312,7 @@ namespace mets { virtual ~move() - { }; + = default;; /// /// @brief Evaluate the cost after the move. @@ -394,32 +394,32 @@ namespace mets { /// @brief Virtual method that applies the move on a point gol_type - evaluate(const mets::feasible_solution& s) const + evaluate(const mets::feasible_solution& s) const override { const permutation_problem& sol = static_cast(s); return sol.cost_function() + sol.evaluate_swap(p1, p2); } /// @brief Virtual method that applies the move on a point void - apply(mets::feasible_solution& s) const + apply(mets::feasible_solution& s) const override { permutation_problem& sol = static_cast(s); sol.apply_swap(p1, p2); } /// @brief Clones this move (so that the tabu list can store it) clonable* - clone() const + clone() const override { return new swap_elements(p1, p2); } /// @brief An hash function used by the tabu list (the hash value is /// used to insert the move in an hash set). std::size_t - hash() const + hash() const override { return (p1)<<16^(p2); } /// @brief Comparison operator used to tell if this move is equal to /// a move in the simple tabu list move set. bool - operator==(const mets::mana_move& o) const; + operator==(const mets::mana_move& o) const override; /// @brief Modify this swap move. void change(int from, int to) @@ -449,26 +449,26 @@ namespace mets { /// @brief Virtual method that applies the move on a point gol_type - evaluate(const mets::feasible_solution& s) const; + evaluate(const mets::feasible_solution& s) const override; /// @brief Virtual method that applies the move on a point void - apply(mets::feasible_solution& s) const; + apply(mets::feasible_solution& s) const override; clonable* - clone() const + clone() const override { return new invert_subsequence(p1, p2); } /// @brief An hash function used by the tabu list (the hash value is /// used to insert the move in an hash set). std::size_t - hash() const + hash() const override { return (p1)<<16^(p2); } /// @brief Comparison operator used to tell if this move is equal to /// a move in the tabu list. bool - operator==(const mets::mana_move& o) const; + operator==(const mets::mana_move& o) const override; void change(int from, int to) { p1 = from; p2 = to; } @@ -515,7 +515,7 @@ namespace mets { /// @brief Virtual destructor virtual ~move_manager() - { } + = default; /// @brief Selects a different set of moves at each iteration. virtual void @@ -569,10 +569,10 @@ namespace mets { unsigned int moves); /// @brief Dtor. - ~swap_neighborhood(); + ~swap_neighborhood() override; /// @brief Selects a different set of moves at each iteration. - void refresh(mets::feasible_solution& s); + void refresh(mets::feasible_solution& s) override; protected: random_generator& rng; @@ -658,14 +658,14 @@ namespace mets { } /// @brief Dtor. - ~swap_full_neighborhood() { + ~swap_full_neighborhood() override { for(move_manager::iterator it = moves_m.begin(); it != moves_m.end(); ++it) delete *it; } /// @brief Use the same set set of moves at each iteration. - void refresh(mets::feasible_solution& /*s*/) { } + void refresh(mets::feasible_solution& /*s*/) override { } }; @@ -683,7 +683,7 @@ namespace mets { } /// @brief Dtor. - ~invert_full_neighborhood() { + ~invert_full_neighborhood() override { for(std::deque::iterator it = moves_m.begin(); it != moves_m.end(); ++it) delete *it; @@ -691,7 +691,7 @@ namespace mets { /// @brief This is a static neighborhood void - refresh(mets::feasible_solution& /*s*/) + refresh(mets::feasible_solution& /*s*/) override { } }; diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/observer.hh b/recognition/include/pcl/recognition/3rdparty/metslib/observer.hh index 0c6f3c28729..88a5546c70e 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/observer.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/observer.hh @@ -62,7 +62,7 @@ namespace mets { void operator()(observer* o) { o->update(who_m); } private: - update_observer(); + update_observer() = delete; observed_subject* who_m; }; @@ -84,7 +84,7 @@ namespace mets { { public: virtual - ~subject() {}; + ~subject() = default;; /// @brief Attach a new observer to this subject. /// /// @param o: a new observer for this subject. @@ -127,7 +127,7 @@ namespace mets { { public: virtual - ~observer() {}; + ~observer() = default;; /// @brief This method is automatically called when this /// observer is attached to a "notified" subject. /// @@ -136,7 +136,7 @@ namespace mets { virtual void update(observed_subject*) = 0; protected: - observer() {}; + observer() = default;; }; diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh b/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh index 11c1830a60a..610e74a3880 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh @@ -51,12 +51,12 @@ namespace mets { public: /// @brief Constructor abstract_cooling_schedule() - { } + = default; /// @brief Virtual destructor virtual ~abstract_cooling_schedule() - { } + = default; /// @brief The function that updates the SA temperature. /// @@ -120,8 +120,8 @@ namespace mets { /// /// Remember that this is a minimization process. /// - virtual void - search(); + void + search() override; void setApplyAndEvaluate(bool b) { apply_and_evaluate = b; @@ -175,7 +175,7 @@ namespace mets { : abstract_cooling_schedule(), factor_m(alpha) { if(alpha >= 1) throw std::runtime_error("alpha must be < 1"); } double - operator()(double temp, feasible_solution& /*fs*/) + operator()(double temp, feasible_solution& /*fs*/) override { return temp*factor_m; } protected: double factor_m; @@ -190,7 +190,7 @@ namespace mets { : abstract_cooling_schedule(), decrement_m(delta) { if(delta <= 0) throw std::runtime_error("delta must be > 0"); } double - operator()(double temp, feasible_solution& /*fs*/) + operator()(double temp, feasible_solution& /*fs*/) override { return std::max(0.0, temp-decrement_m); } protected: double decrement_m; diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh b/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh index 491e23b7b5d..43cd87a9c03 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh @@ -56,7 +56,7 @@ namespace mets { /// /// @param next Optional next criteria in the chain. explicit - aspiration_criteria_chain(aspiration_criteria_chain *next = 0) + aspiration_criteria_chain(aspiration_criteria_chain *next = nullptr) : next_m(next) { } @@ -69,7 +69,7 @@ namespace mets { /// @brief Virtual destructor. virtual ~aspiration_criteria_chain() - { } + = default; /// @brief A method to reset this aspiration criteria chain to its /// original state. @@ -118,7 +118,7 @@ namespace mets { /// Create an abstract tabu list with a certain tenure explicit tabu_list_chain(unsigned int tenure) - : next_m(0), tenure_m(tenure) + : next_m(nullptr), tenure_m(tenure) { } /// @brief Create an abstract tabu list with a certain tenure and @@ -130,7 +130,7 @@ namespace mets { /// @brief Virtual destructor virtual ~tabu_list_chain() - { } + = default; /// /// @brief Make a move tabu when starting from a certain solution. @@ -232,7 +232,7 @@ namespace mets { search_type& operator=(const search_type&); virtual - ~tabu_search() {} + ~tabu_search() = default; /// @brief This method starts the tabu search process. /// @@ -300,7 +300,7 @@ namespace mets { tabu_hash_m(tenure) {} /// @brief Destructor - ~simple_tabu_list(); + ~simple_tabu_list() override; /// @brief Make move a tabu. /// @@ -309,7 +309,7 @@ namespace mets { /// @param sol The current working solution /// @param mov The move to make tabu void - tabu(feasible_solution& sol, /* const */ move& mov); + tabu(feasible_solution& sol, /* const */ move& mov) override; /// @brief True if the move is tabu for the given solution. /// @@ -321,16 +321,12 @@ namespace mets { /// @return True if this move was already made during the last /// tenure iterations bool - is_tabu(feasible_solution& sol, move& mov) const; + is_tabu(feasible_solution& sol, move& mov) const override; protected: using move_list_type = std::deque; #if defined (METSLIB_TR1_BOOST) - typedef boost::unordered_map< - mana_move*, // Key type - int, //insert a move and the number of times it's present in the list - mana_move_hash, - dereferenced_equal_to > move_map_type; + using move_map_type = boost::unordered_map >; #elif defined (METSLIB_HAVE_UNORDERED_MAP) && !defined (METSLIB_TR1_MIXED_NAMESPACE) typedef std::unordered_map< mana_move*, // Key type @@ -366,13 +362,13 @@ namespace mets { double min_improvement = 1e-6); void - reset(); + reset() override; void - accept(feasible_solution& fs, move& mov, gol_type evaluation); + accept(feasible_solution& fs, move& mov, gol_type evaluation) override; bool - operator()(feasible_solution& fs, move& mov, gol_type evaluation) const; + operator()(feasible_solution& fs, move& mov, gol_type evaluation) const override; protected: gol_type best_m; diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh b/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh index 63bb6eec68b..592969f0496 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh @@ -49,7 +49,7 @@ namespace mets { /// /// @param next Optional next criterium in the chain. explicit - termination_criteria_chain(termination_criteria_chain* next = 0) + termination_criteria_chain(termination_criteria_chain* next = nullptr) : next_m(next) { } /// purposely not implemented (see Effective C++) @@ -59,7 +59,7 @@ namespace mets { /// @brief Virtual destructor. virtual ~termination_criteria_chain() - { } + = default; /// @brief Alternate function that decides if we shoud terminate the /// search process @@ -103,7 +103,7 @@ namespace mets { iterations_m(max) {} bool - operator()(const feasible_solution& fs) + operator()(const feasible_solution& fs) override { if (iterations_m <= 0) return true; @@ -113,7 +113,7 @@ namespace mets { } void - reset() + reset() override { iterations_m = max_m; termination_criteria_chain::reset(); } protected: @@ -155,8 +155,8 @@ namespace mets { { } bool - operator()(const feasible_solution& fs); - void reset() + operator()(const feasible_solution& fs) override; + void reset() override { iterations_left_m = max_noimprove_m; second_guess_m = total_iterations_m = resets_m = 0; best_cost_m = std::numeric_limits::max(); @@ -199,7 +199,7 @@ namespace mets { { } bool - operator()(const feasible_solution& fs) + operator()(const feasible_solution& fs) override { mets::gol_type current_cost = dynamic_cast(fs).cost_function(); @@ -210,7 +210,7 @@ namespace mets { return termination_criteria_chain::operator()(fs); } - void reset() + void reset() override { termination_criteria_chain::reset(); } protected: @@ -233,9 +233,9 @@ namespace mets { public: forever() : termination_criteria_chain() {} bool - operator()(const feasible_solution& /*fs*/) + operator()(const feasible_solution& /*fs*/) override { return false; } - void reset() + void reset() override { termination_criteria_chain::reset(); } }; diff --git a/recognition/include/pcl/recognition/cg/correspondence_grouping.h b/recognition/include/pcl/recognition/cg/correspondence_grouping.h index f2ab0aeca11..ea7c1548e13 100644 --- a/recognition/include/pcl/recognition/cg/correspondence_grouping.h +++ b/recognition/include/pcl/recognition/cg/correspondence_grouping.h @@ -62,7 +62,7 @@ namespace pcl CorrespondenceGrouping () : scene_ () {} /** \brief destructor. */ - ~CorrespondenceGrouping() + ~CorrespondenceGrouping() override { scene_.reset (); model_scene_corrs_.reset (); diff --git a/recognition/include/pcl/recognition/color_gradient_modality.h b/recognition/include/pcl/recognition/color_gradient_modality.h index 52bf392755d..6f286ca53f5 100644 --- a/recognition/include/pcl/recognition/color_gradient_modality.h +++ b/recognition/include/pcl/recognition/color_gradient_modality.h @@ -94,7 +94,7 @@ namespace pcl /** \brief Constructor. */ ColorGradientModality (); /** \brief Destructor. */ - ~ColorGradientModality (); + ~ColorGradientModality () override; /** \brief Sets the threshold for the gradient magnitude which is used when quantizing the data. * Gradients with a smaller magnitude are ignored. @@ -287,8 +287,7 @@ ColorGradientModality () template pcl::ColorGradientModality:: ~ColorGradientModality () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/recognition/include/pcl/recognition/distance_map.h b/recognition/include/pcl/recognition/distance_map.h index defb00d6e82..92353f22f1c 100644 --- a/recognition/include/pcl/recognition/distance_map.h +++ b/recognition/include/pcl/recognition/distance_map.h @@ -49,7 +49,7 @@ namespace pcl /** \brief Constructor. */ DistanceMap () : data_ (0), width_ (0), height_ (0) {} /** \brief Destructor. */ - virtual ~DistanceMap () {} + virtual ~DistanceMap () = default; /** \brief Returns the width of the map. */ inline std::size_t diff --git a/recognition/include/pcl/recognition/dot_modality.h b/recognition/include/pcl/recognition/dot_modality.h index f177f032b96..a34d2139240 100644 --- a/recognition/include/pcl/recognition/dot_modality.h +++ b/recognition/include/pcl/recognition/dot_modality.h @@ -48,7 +48,7 @@ namespace pcl { public: - virtual ~DOTModality () {}; + virtual ~DOTModality () = default;; //virtual QuantizedMap & //getDominantQuantizedMap () = 0; diff --git a/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h b/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h index fa533b09b1b..d0ff6be133a 100644 --- a/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h +++ b/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h @@ -123,9 +123,7 @@ namespace pcl } virtual ~FaceDetectorDataProvider() - { - - } + = default; void setPatchesPerImage(int n) { diff --git a/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h b/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h index bf5d329711d..eb95b055c46 100644 --- a/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h +++ b/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h @@ -77,9 +77,7 @@ namespace pcl } virtual ~RFFaceDetectorTrainer() - { - - } + = default; /* * Common parameters diff --git a/recognition/include/pcl/recognition/face_detection/rf_face_utils.h b/recognition/include/pcl/recognition/face_detection/rf_face_utils.h index a592c00c223..8fd671d368d 100644 --- a/recognition/include/pcl/recognition/face_detection/rf_face_utils.h +++ b/recognition/include/pcl/recognition/face_detection/rf_face_utils.h @@ -204,9 +204,8 @@ namespace pcl } /** \brief Destructor. */ - ~PoseClassRegressionVarianceStatsEstimator() - { - } + ~PoseClassRegressionVarianceStatsEstimator() override + = default; /** \brief Returns the number of branches the corresponding tree has. */ inline std::size_t getNumOfBranches() const override diff --git a/recognition/include/pcl/recognition/linemod.h b/recognition/include/pcl/recognition/linemod.h index 06176149ced..48bdbea73ae 100644 --- a/recognition/include/pcl/recognition/linemod.h +++ b/recognition/include/pcl/recognition/linemod.h @@ -61,8 +61,7 @@ namespace pcl /** \brief Destructor. */ virtual ~EnergyMaps () - { - } + = default; /** \brief Returns the width of the energy maps. */ inline std::size_t @@ -206,8 +205,7 @@ namespace pcl /** \brief Destructor. */ virtual ~LinearizedMaps () - { - } + = default; /** \brief Returns the width of the linearized map. */ inline std::size_t diff --git a/recognition/include/pcl/recognition/linemod/line_rgbd.h b/recognition/include/pcl/recognition/linemod/line_rgbd.h index 340b8cee065..cf33c352a78 100644 --- a/recognition/include/pcl/recognition/linemod/line_rgbd.h +++ b/recognition/include/pcl/recognition/linemod/line_rgbd.h @@ -106,8 +106,7 @@ namespace pcl /** \brief Destructor */ virtual ~LineRGBD () - { - } + = default; /** \brief Loads templates from a LMT (LineMod Template) file. Overrides old templates. * diff --git a/recognition/include/pcl/recognition/ransac_based/bvh.h b/recognition/include/pcl/recognition/ransac_based/bvh.h index 540e6b47007..0ee7dc57e8e 100644 --- a/recognition/include/pcl/recognition/ransac_based/bvh.h +++ b/recognition/include/pcl/recognition/ransac_based/bvh.h @@ -74,8 +74,7 @@ namespace pcl } virtual ~BoundedObject () - { - } + = default; /** \brief This method is for std::sort. */ inline static bool diff --git a/recognition/include/pcl/recognition/ransac_based/hypothesis.h b/recognition/include/pcl/recognition/ransac_based/hypothesis.h index e4dc596d363..7b20c373d71 100644 --- a/recognition/include/pcl/recognition/ransac_based/hypothesis.h +++ b/recognition/include/pcl/recognition/ransac_based/hypothesis.h @@ -65,7 +65,7 @@ namespace pcl memcpy (rigid_transform_, rigid_transform, 12*sizeof (float)); } - virtual ~HypothesisBase (){} + virtual ~HypothesisBase ()= default; void setModel (const ModelLibrary::Model* model) @@ -95,7 +95,7 @@ namespace pcl { } - ~Hypothesis (){} + ~Hypothesis () override= default; const Hypothesis& operator =(const Hypothesis& src) diff --git a/recognition/include/pcl/recognition/ransac_based/model_library.h b/recognition/include/pcl/recognition/ransac_based/model_library.h index b709c5b73f0..bc0d7d0d350 100644 --- a/recognition/include/pcl/recognition/ransac_based/model_library.h +++ b/recognition/include/pcl/recognition/ransac_based/model_library.h @@ -121,8 +121,7 @@ namespace pcl } virtual ~Model () - { - } + = default; inline const std::string& getObjectName () const diff --git a/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h b/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h index fb1b6f3bdd3..9a19b947266 100644 --- a/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h +++ b/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h @@ -104,7 +104,7 @@ namespace pcl { memcpy(this->rigid_transform_, rigid_transform, 12*sizeof (float)); } - virtual ~Output (){} + virtual ~Output ()= default; public: std::string object_name_; @@ -121,7 +121,7 @@ namespace pcl { } - virtual ~OrientedPointPair (){} + virtual ~OrientedPointPair ()= default; public: const float *p1_, *n1_, *p2_, *n2_; @@ -130,8 +130,8 @@ namespace pcl class HypothesisCreator { public: - HypothesisCreator (){} - virtual ~HypothesisCreator (){} + HypothesisCreator ()= default; + virtual ~HypothesisCreator ()= default; Hypothesis* create (const SimpleOctree::Node* ) const { return new Hypothesis ();} }; diff --git a/recognition/include/pcl/recognition/ransac_based/orr_graph.h b/recognition/include/pcl/recognition/ransac_based/orr_graph.h index cf118ba2c10..b55674f4da9 100644 --- a/recognition/include/pcl/recognition/ransac_based/orr_graph.h +++ b/recognition/include/pcl/recognition/ransac_based/orr_graph.h @@ -69,7 +69,7 @@ namespace pcl state_(UNDEF) {} - virtual ~Node (){} + virtual ~Node ()= default; inline const std::set& getNeighbors () const @@ -124,7 +124,7 @@ namespace pcl }; public: - ORRGraph (){} + ORRGraph ()= default; virtual ~ORRGraph (){ this->clear ();} inline void diff --git a/recognition/include/pcl/recognition/ransac_based/orr_octree.h b/recognition/include/pcl/recognition/ransac_based/orr_octree.h index 58d9781ad57..76ecb7b7c37 100644 --- a/recognition/include/pcl/recognition/ransac_based/orr_octree.h +++ b/recognition/include/pcl/recognition/ransac_based/orr_octree.h @@ -89,7 +89,7 @@ namespace pcl n_[0] = n_[1] = n_[2] = p_[0] = p_[1] = p_[2] = 0.0f; } - virtual~ Data (){} + virtual~ Data ()= default; inline void addToPoint (float x, float y, float z) diff --git a/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h b/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h index 7d65d3f6118..8bfaab73f8d 100644 --- a/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h +++ b/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h @@ -138,7 +138,7 @@ namespace pcl };// class Entry public: - RotationSpaceCell (){} + RotationSpaceCell ()= default; virtual ~RotationSpaceCell () { model_to_entry_.clear (); @@ -174,8 +174,8 @@ namespace pcl class RotationSpaceCellCreator { public: - RotationSpaceCellCreator (){} - virtual ~RotationSpaceCellCreator (){} + RotationSpaceCellCreator ()= default; + virtual ~RotationSpaceCellCreator ()= default; RotationSpaceCell* create (const SimpleOctree::Node* ) { @@ -297,7 +297,7 @@ namespace pcl : counter_ (0) {} - virtual ~RotationSpaceCreator(){} + virtual ~RotationSpaceCreator()= default; RotationSpace* create(const SimpleOctree::Node* leaf) { @@ -340,7 +340,7 @@ namespace pcl class PCL_EXPORTS RigidTransformSpace { public: - RigidTransformSpace (){} + RigidTransformSpace ()= default; virtual ~RigidTransformSpace (){ this->clear ();} inline void diff --git a/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h b/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h index 1d4ee8352e1..42931b4029b 100644 --- a/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h +++ b/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h @@ -72,8 +72,8 @@ namespace pcl : new_to_old_energy_ratio_ (0.99f) {} - ~TrimmedICP () - {} + ~TrimmedICP () override + = default; /** \brief Call this method before calling align(). * diff --git a/recognition/include/pcl/recognition/sparse_quantized_multi_mod_template.h b/recognition/include/pcl/recognition/sparse_quantized_multi_mod_template.h index 9a38fff5e49..a626933ce63 100644 --- a/recognition/include/pcl/recognition/sparse_quantized_multi_mod_template.h +++ b/recognition/include/pcl/recognition/sparse_quantized_multi_mod_template.h @@ -108,7 +108,7 @@ namespace pcl struct SparseQuantizedMultiModTemplate { /** \brief Constructor. */ - SparseQuantizedMultiModTemplate () {} + SparseQuantizedMultiModTemplate () = default; /** \brief The storage for the multi-modality features. */ std::vector features; diff --git a/recognition/include/pcl/recognition/surface_normal_modality.h b/recognition/include/pcl/recognition/surface_normal_modality.h index 9c9d0110888..b140729443c 100644 --- a/recognition/include/pcl/recognition/surface_normal_modality.h +++ b/recognition/include/pcl/recognition/surface_normal_modality.h @@ -65,7 +65,7 @@ namespace pcl /** \brief Constructor. */ inline LINEMOD_OrientationMap () : width_ (0), height_ (0) {} /** \brief Destructor. */ - inline ~LINEMOD_OrientationMap () {} + inline ~LINEMOD_OrientationMap () = default; /** \brief Returns the width of the modality data map. */ inline std::size_t @@ -336,7 +336,7 @@ namespace pcl /** \brief Constructor. */ SurfaceNormalModality (); /** \brief Destructor. */ - ~SurfaceNormalModality (); + ~SurfaceNormalModality () override; /** \brief Sets the spreading size. * \param[in] spreading_size the spreading size. @@ -505,8 +505,7 @@ SurfaceNormalModality () ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::SurfaceNormalModality::~SurfaceNormalModality () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/recognition/src/dotmod.cpp b/recognition/src/dotmod.cpp index e6927398a18..eaf08b793b8 100644 --- a/recognition/src/dotmod.cpp +++ b/recognition/src/dotmod.cpp @@ -52,8 +52,7 @@ DOTMOD(std::size_t template_width, ////////////////////////////////////////////////////////////////////////////////////////////// pcl::DOTMOD:: ~DOTMOD() -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// size_t diff --git a/recognition/src/linemod.cpp b/recognition/src/linemod.cpp index 8357451533f..4a96d8a66fe 100644 --- a/recognition/src/linemod.cpp +++ b/recognition/src/linemod.cpp @@ -57,8 +57,7 @@ pcl::LINEMOD::LINEMOD () ////////////////////////////////////////////////////////////////////////////////////////////// pcl::LINEMOD::~LINEMOD() -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// int diff --git a/recognition/src/quantizable_modality.cpp b/recognition/src/quantizable_modality.cpp index 9f10a04a777..b8dea084e53 100644 --- a/recognition/src/quantizable_modality.cpp +++ b/recognition/src/quantizable_modality.cpp @@ -40,13 +40,11 @@ ////////////////////////////////////////////////////////////////////////////////////////////// pcl::QuantizableModality::QuantizableModality () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// pcl::QuantizableModality::~QuantizableModality () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// pcl::QuantizedMap::QuantizedMap () @@ -69,8 +67,7 @@ pcl::QuantizedMap::QuantizedMap (const std::size_t width, const std::size_t heig ////////////////////////////////////////////////////////////////////////////////////////////// pcl::QuantizedMap::~QuantizedMap () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/registration/include/pcl/registration/convergence_criteria.h b/registration/include/pcl/registration/convergence_criteria.h index afbe2a3966e..631337c81d1 100644 --- a/registration/include/pcl/registration/convergence_criteria.h +++ b/registration/include/pcl/registration/convergence_criteria.h @@ -67,10 +67,10 @@ class PCL_EXPORTS ConvergenceCriteria { using ConstPtr = shared_ptr; /** \brief Empty constructor. */ - ConvergenceCriteria() {} + ConvergenceCriteria() = default; /** \brief Empty destructor. */ - virtual ~ConvergenceCriteria() {} + virtual ~ConvergenceCriteria() = default; /** \brief Check if convergence has been reached. Pure virtual. */ virtual bool diff --git a/registration/include/pcl/registration/correspondence_estimation.h b/registration/include/pcl/registration/correspondence_estimation.h index f180d8d50fd..55b5d2a47d4 100644 --- a/registration/include/pcl/registration/correspondence_estimation.h +++ b/registration/include/pcl/registration/correspondence_estimation.h @@ -101,7 +101,7 @@ class CorrespondenceEstimationBase : public PCLBase { {} /** \brief Empty destructor */ - ~CorrespondenceEstimationBase() {} + ~CorrespondenceEstimationBase() override = default; /** \brief Provide a pointer to the input source * (e.g., the point cloud that we want to align to the target) @@ -411,7 +411,7 @@ class CorrespondenceEstimation CorrespondenceEstimation() { corr_name_ = "CorrespondenceEstimation"; } /** \brief Empty destructor */ - ~CorrespondenceEstimation() {} + ~CorrespondenceEstimation() override = default; /** \brief Determine the correspondences between input and target cloud. * \param[out] correspondences the found correspondences (index of query point, index diff --git a/registration/include/pcl/registration/correspondence_estimation_backprojection.h b/registration/include/pcl/registration/correspondence_estimation_backprojection.h index 344d692af44..eb695201c93 100644 --- a/registration/include/pcl/registration/correspondence_estimation_backprojection.h +++ b/registration/include/pcl/registration/correspondence_estimation_backprojection.h @@ -105,7 +105,7 @@ class CorrespondenceEstimationBackProjection } /** \brief Empty destructor */ - virtual ~CorrespondenceEstimationBackProjection() {} + virtual ~CorrespondenceEstimationBackProjection() = default; /** \brief Set the normals computed on the source point cloud * \param[in] normals the normals computed for the source cloud diff --git a/registration/include/pcl/registration/correspondence_estimation_normal_shooting.h b/registration/include/pcl/registration/correspondence_estimation_normal_shooting.h index a4b17bf5697..6927b4dfa58 100644 --- a/registration/include/pcl/registration/correspondence_estimation_normal_shooting.h +++ b/registration/include/pcl/registration/correspondence_estimation_normal_shooting.h @@ -126,7 +126,7 @@ class CorrespondenceEstimationNormalShooting } /** \brief Empty destructor */ - ~CorrespondenceEstimationNormalShooting() {} + ~CorrespondenceEstimationNormalShooting() override = default; /** \brief Set the normals computed on the source point cloud * \param[in] normals the normals computed for the source cloud diff --git a/registration/include/pcl/registration/correspondence_rejection.h b/registration/include/pcl/registration/correspondence_rejection.h index dc3e3cab39f..46f26aa4d4b 100644 --- a/registration/include/pcl/registration/correspondence_rejection.h +++ b/registration/include/pcl/registration/correspondence_rejection.h @@ -57,10 +57,10 @@ class CorrespondenceRejector { using ConstPtr = shared_ptr; /** \brief Empty constructor. */ - CorrespondenceRejector() {} + CorrespondenceRejector() = default; /** \brief Empty destructor. */ - virtual ~CorrespondenceRejector() {} + virtual ~CorrespondenceRejector() = default; /** \brief Provide a pointer to the vector of the input correspondences. * \param[in] correspondences the const shared pointer to a correspondence vector @@ -255,7 +255,7 @@ class DataContainer : public DataContainerInterface { {} /** \brief Empty destructor */ - ~DataContainer() {} + ~DataContainer() override = default; /** \brief Provide a source point cloud dataset (must contain XYZ * data!), used to compute the correspondence distance. diff --git a/registration/include/pcl/registration/correspondence_rejection_distance.h b/registration/include/pcl/registration/correspondence_rejection_distance.h index 9cc78360623..667063e195a 100644 --- a/registration/include/pcl/registration/correspondence_rejection_distance.h +++ b/registration/include/pcl/registration/correspondence_rejection_distance.h @@ -74,7 +74,7 @@ class PCL_EXPORTS CorrespondenceRejectorDistance : public CorrespondenceRejector } /** \brief Empty destructor */ - ~CorrespondenceRejectorDistance() {} + ~CorrespondenceRejectorDistance() override = default; /** \brief Get a list of valid correspondences after rejection from the original set * of correspondences. \param[in] original_correspondences the set of initial diff --git a/registration/include/pcl/registration/correspondence_rejection_features.h b/registration/include/pcl/registration/correspondence_rejection_features.h index 1409f2d8967..ff52993abfa 100644 --- a/registration/include/pcl/registration/correspondence_rejection_features.h +++ b/registration/include/pcl/registration/correspondence_rejection_features.h @@ -71,7 +71,7 @@ class PCL_EXPORTS CorrespondenceRejectorFeatures : public CorrespondenceRejector } /** \brief Empty destructor. */ - ~CorrespondenceRejectorFeatures() {} + ~CorrespondenceRejectorFeatures() override = default; /** \brief Get a list of valid correspondences after rejection from the original set * of correspondences \param[in] original_correspondences the set of initial @@ -201,7 +201,7 @@ class PCL_EXPORTS CorrespondenceRejectorFeatures : public CorrespondenceRejector {} /** \brief Empty destructor */ - ~FeatureContainer() {} + ~FeatureContainer() override = default; inline void setSourceFeature(const FeatureCloudConstPtr& source_features) diff --git a/registration/include/pcl/registration/correspondence_rejection_sample_consensus.h b/registration/include/pcl/registration/correspondence_rejection_sample_consensus.h index b80d4e828ab..99b0c63595c 100644 --- a/registration/include/pcl/registration/correspondence_rejection_sample_consensus.h +++ b/registration/include/pcl/registration/correspondence_rejection_sample_consensus.h @@ -80,7 +80,7 @@ class CorrespondenceRejectorSampleConsensus : public CorrespondenceRejector { } /** \brief Empty destructor. */ - ~CorrespondenceRejectorSampleConsensus() {} + ~CorrespondenceRejectorSampleConsensus() override = default; /** \brief Get a list of valid correspondences after rejection from the original set * of correspondences. \param[in] original_correspondences the set of initial diff --git a/registration/include/pcl/registration/correspondence_rejection_trimmed.h b/registration/include/pcl/registration/correspondence_rejection_trimmed.h index c0be69400a5..799bf284dc2 100644 --- a/registration/include/pcl/registration/correspondence_rejection_trimmed.h +++ b/registration/include/pcl/registration/correspondence_rejection_trimmed.h @@ -74,7 +74,7 @@ class PCL_EXPORTS CorrespondenceRejectorTrimmed : public CorrespondenceRejector } /** \brief Destructor. */ - ~CorrespondenceRejectorTrimmed() {} + ~CorrespondenceRejectorTrimmed() override = default; /** \brief Set the expected ratio of overlap between point clouds (in * terms of correspondences). diff --git a/registration/include/pcl/registration/default_convergence_criteria.h b/registration/include/pcl/registration/default_convergence_criteria.h index ab9baea20b3..01189b44cff 100644 --- a/registration/include/pcl/registration/default_convergence_criteria.h +++ b/registration/include/pcl/registration/default_convergence_criteria.h @@ -111,7 +111,7 @@ class DefaultConvergenceCriteria : public ConvergenceCriteria { {} /** \brief Empty destructor */ - ~DefaultConvergenceCriteria() {} + ~DefaultConvergenceCriteria() override = default; /** \brief Set the maximum number of consecutive iterations that the internal * rotation, translation, and MSE differences are allowed to be similar. \param[in] diff --git a/registration/include/pcl/registration/distances.h b/registration/include/pcl/registration/distances.h index caa261a3e7a..83f3dd101d0 100644 --- a/registration/include/pcl/registration/distances.h +++ b/registration/include/pcl/registration/distances.h @@ -42,9 +42,8 @@ #include -#include - #include +#include #include namespace pcl { diff --git a/registration/include/pcl/registration/elch.h b/registration/include/pcl/registration/elch.h index 736ce6397b6..832912dd73f 100644 --- a/registration/include/pcl/registration/elch.h +++ b/registration/include/pcl/registration/elch.h @@ -95,7 +95,7 @@ class ELCH : public PCLBase { , vd_(){}; /** \brief Empty destructor */ - ~ELCH() {} + ~ELCH() override = default; /** \brief Add a new point cloud to the internal graph. * \param[in] cloud the new point cloud diff --git a/registration/include/pcl/registration/gicp6d.h b/registration/include/pcl/registration/gicp6d.h index 1c1fe8f2e6d..b441227b6a1 100644 --- a/registration/include/pcl/registration/gicp6d.h +++ b/registration/include/pcl/registration/gicp6d.h @@ -171,7 +171,7 @@ class PCL_EXPORTS GeneralizedIterativeClosestPoint6D trivial_ = false; } - ~MyPointRepresentation() {} + ~MyPointRepresentation() override = default; inline Ptr makeShared() const diff --git a/registration/include/pcl/registration/ia_ransac.h b/registration/include/pcl/registration/ia_ransac.h index bff64bea724..937fe389ff0 100644 --- a/registration/include/pcl/registration/ia_ransac.h +++ b/registration/include/pcl/registration/ia_ransac.h @@ -99,7 +99,7 @@ class SampleConsensusInitialAlignment : public Registration { /** \brief Structure for representing a single pyramid histogram level */ struct PyramidFeatureHistogramLevel { - PyramidFeatureHistogramLevel() {} + PyramidFeatureHistogramLevel() = default; PyramidFeatureHistogramLevel(std::vector& a_bins_per_dimension, std::vector& a_bin_step) diff --git a/registration/include/pcl/registration/registration.h b/registration/include/pcl/registration/registration.h index 368c553aeaa..3729cc9516b 100644 --- a/registration/include/pcl/registration/registration.h +++ b/registration/include/pcl/registration/registration.h @@ -134,7 +134,7 @@ class Registration : public PCLBase { {} /** \brief destructor. */ - ~Registration() {} + ~Registration() override = default; /** \brief Provide a pointer to the transformation estimation object. * (e.g., SVD, point to plane etc.) diff --git a/registration/include/pcl/registration/sample_consensus_prerejective.h b/registration/include/pcl/registration/sample_consensus_prerejective.h index d7ff45c0a6a..5c9731b3b83 100644 --- a/registration/include/pcl/registration/sample_consensus_prerejective.h +++ b/registration/include/pcl/registration/sample_consensus_prerejective.h @@ -135,7 +135,7 @@ class SampleConsensusPrerejective : public Registration; - TransformationEstimation(){}; - virtual ~TransformationEstimation(){}; + TransformationEstimation()= default;; + virtual ~TransformationEstimation()= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud. \param[in] cloud_src the source point cloud dataset \param[in] diff --git a/registration/include/pcl/registration/transformation_estimation_2D.h b/registration/include/pcl/registration/transformation_estimation_2D.h index beb3cde8bb7..b4bc662710c 100644 --- a/registration/include/pcl/registration/transformation_estimation_2D.h +++ b/registration/include/pcl/registration/transformation_estimation_2D.h @@ -65,8 +65,8 @@ class TransformationEstimation2D using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimation2D(){}; - virtual ~TransformationEstimation2D(){}; + TransformationEstimation2D()= default;; + virtual ~TransformationEstimation2D()= default;; /** \brief Estimate a rigid transformation between a source and a target point cloud * in 2D. \param[in] cloud_src the source point cloud dataset \param[in] cloud_tgt the diff --git a/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h b/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h index 608e7e7d44e..c5315147331 100644 --- a/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h +++ b/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h @@ -64,8 +64,8 @@ class TransformationEstimationDualQuaternion using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimationDualQuaternion(){}; - ~TransformationEstimationDualQuaternion(){}; + TransformationEstimationDualQuaternion()= default;; + ~TransformationEstimationDualQuaternion()= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using dual quaternion optimization \param[in] cloud_src the source diff --git a/registration/include/pcl/registration/transformation_estimation_lm.h b/registration/include/pcl/registration/transformation_estimation_lm.h index b2c9dda59cd..ebf1b2a0310 100644 --- a/registration/include/pcl/registration/transformation_estimation_lm.h +++ b/registration/include/pcl/registration/transformation_estimation_lm.h @@ -104,7 +104,7 @@ class TransformationEstimationLM } /** \brief Destructor. */ - ~TransformationEstimationLM(){}; + ~TransformationEstimationLM() override= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using LM. \param[in] cloud_src the source point cloud dataset @@ -237,7 +237,7 @@ class TransformationEstimationLM Functor(int m_data_points) : m_data_points_(m_data_points) {} /** \brief Destructor. */ - virtual ~Functor() {} + virtual ~Functor() = default; /** \brief Get the number of values. */ int @@ -282,7 +282,7 @@ class TransformationEstimationLM } /** \brief Destructor. */ - ~OptimizationFunctor() {} + ~OptimizationFunctor() override = default; /** Fill fvec from x. For the current state vector x fill the f values * \param[in] x state vector @@ -327,7 +327,7 @@ class TransformationEstimationLM } /** \brief Destructor. */ - ~OptimizationFunctorWithIndices() {} + ~OptimizationFunctorWithIndices() override = default; /** Fill fvec from x. For the current state vector x fill the f values * \param[in] x state vector diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane.h index 36f3a93213f..83a02a87476 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane.h @@ -71,8 +71,8 @@ class TransformationEstimationPointToPlane using Vector4 = Eigen::Matrix; - TransformationEstimationPointToPlane(){}; - ~TransformationEstimationPointToPlane(){}; + TransformationEstimationPointToPlane()= default;; + ~TransformationEstimationPointToPlane()= default;; protected: Scalar diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h index 16e24423532..db72b7de767 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h @@ -71,8 +71,8 @@ class TransformationEstimationPointToPlaneLLS using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimationPointToPlaneLLS(){}; - ~TransformationEstimationPointToPlaneLLS(){}; + TransformationEstimationPointToPlaneLLS()= default;; + ~TransformationEstimationPointToPlaneLLS() override= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h index f04415b2caa..ebbb34a96c6 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h @@ -74,8 +74,8 @@ class TransformationEstimationPointToPlaneLLSWeighted using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimationPointToPlaneLLSWeighted(){}; - virtual ~TransformationEstimationPointToPlaneLLSWeighted(){}; + TransformationEstimationPointToPlaneLLSWeighted()= default;; + virtual ~TransformationEstimationPointToPlaneLLSWeighted()= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h index 03a360736f7..f40e27aa82f 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h @@ -115,7 +115,7 @@ class TransformationEstimationPointToPlaneWeighted } /** \brief Destructor. */ - virtual ~TransformationEstimationPointToPlaneWeighted(){}; + virtual ~TransformationEstimationPointToPlaneWeighted()= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using LM. \param[in] cloud_src the source point cloud dataset @@ -236,7 +236,7 @@ class TransformationEstimationPointToPlaneWeighted Functor(int m_data_points) : m_data_points_(m_data_points) {} /** \brief Destructor. */ - virtual ~Functor() {} + virtual ~Functor() = default; /** \brief Get the number of values. */ int @@ -282,7 +282,7 @@ class TransformationEstimationPointToPlaneWeighted } /** \brief Destructor. */ - virtual ~OptimizationFunctor() {} + virtual ~OptimizationFunctor() = default; /** Fill fvec from x. For the current state vector x fill the f values * \param[in] x state vector @@ -330,7 +330,7 @@ class TransformationEstimationPointToPlaneWeighted } /** \brief Destructor. */ - virtual ~OptimizationFunctorWithIndices() {} + virtual ~OptimizationFunctorWithIndices() = default; /** Fill fvec from x. For the current state vector x fill the f values * \param[in] x state vector diff --git a/registration/include/pcl/registration/transformation_estimation_svd.h b/registration/include/pcl/registration/transformation_estimation_svd.h index 16e8c7212c7..d67c755cd4c 100644 --- a/registration/include/pcl/registration/transformation_estimation_svd.h +++ b/registration/include/pcl/registration/transformation_estimation_svd.h @@ -68,7 +68,7 @@ class TransformationEstimationSVD * \param[in] use_umeyama Toggles whether or not to use 3rd party software*/ TransformationEstimationSVD(bool use_umeyama = true) : use_umeyama_(use_umeyama) {} - ~TransformationEstimationSVD(){}; + ~TransformationEstimationSVD() override= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h b/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h index dec86cc40ad..523363d88ae 100644 --- a/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h +++ b/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h @@ -73,7 +73,7 @@ class TransformationEstimationSymmetricPointToPlaneLLS TransformationEstimationSymmetricPointToPlaneLLS() : enforce_same_direction_normals_(true){}; - ~TransformationEstimationSymmetricPointToPlaneLLS(){}; + ~TransformationEstimationSymmetricPointToPlaneLLS()= default;; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_validation.h b/registration/include/pcl/registration/transformation_validation.h index a62348024d0..7fd9f09bbde 100644 --- a/registration/include/pcl/registration/transformation_validation.h +++ b/registration/include/pcl/registration/transformation_validation.h @@ -80,8 +80,8 @@ class TransformationValidation { using PointCloudTargetPtr = typename PointCloudTarget::Ptr; using PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr; - TransformationValidation(){}; - virtual ~TransformationValidation(){}; + TransformationValidation()= default;; + virtual ~TransformationValidation()= default;; /** \brief Validate the given transformation with respect to the input cloud data, and * return a score. Pure virtual. diff --git a/registration/include/pcl/registration/transformation_validation_euclidean.h b/registration/include/pcl/registration/transformation_validation_euclidean.h index 34bbc088a29..8c9b19451e7 100644 --- a/registration/include/pcl/registration/transformation_validation_euclidean.h +++ b/registration/include/pcl/registration/transformation_validation_euclidean.h @@ -104,7 +104,7 @@ class TransformationValidationEuclidean { , force_no_recompute_(false) {} - virtual ~TransformationValidationEuclidean(){}; + virtual ~TransformationValidationEuclidean()= default;; /** \brief Set the maximum allowable distance between a point and its correspondence * in the target in order for a correspondence to be considered \a valid. Default: @@ -247,7 +247,7 @@ class TransformationValidationEuclidean { } /** \brief Empty destructor */ - virtual ~MyPointRepresentation() {} + virtual ~MyPointRepresentation() = default; virtual void copyToFloatArray(const PointTarget& p, float* out) const diff --git a/registration/include/pcl/registration/warp_point_rigid.h b/registration/include/pcl/registration/warp_point_rigid.h index a5c5b5c6c48..a48939e822a 100644 --- a/registration/include/pcl/registration/warp_point_rigid.h +++ b/registration/include/pcl/registration/warp_point_rigid.h @@ -71,7 +71,7 @@ class WarpPointRigid { }; /** \brief Destructor. */ - virtual ~WarpPointRigid(){}; + virtual ~WarpPointRigid()= default;; /** \brief Set warp parameters. Pure virtual. * \param[in] p warp parameters diff --git a/registration/include/pcl/registration/warp_point_rigid_3d.h b/registration/include/pcl/registration/warp_point_rigid_3d.h index 2e6b4b0386b..459681ccae2 100644 --- a/registration/include/pcl/registration/warp_point_rigid_3d.h +++ b/registration/include/pcl/registration/warp_point_rigid_3d.h @@ -66,7 +66,7 @@ class WarpPointRigid3D : public WarpPointRigid(3) {} /** \brief Empty destructor */ - ~WarpPointRigid3D() {} + ~WarpPointRigid3D() override = default; /** \brief Set warp parameters. * \param[in] p warp parameters (tx ty rz) diff --git a/registration/include/pcl/registration/warp_point_rigid_6d.h b/registration/include/pcl/registration/warp_point_rigid_6d.h index 0b5f95c2922..30b07d7c216 100644 --- a/registration/include/pcl/registration/warp_point_rigid_6d.h +++ b/registration/include/pcl/registration/warp_point_rigid_6d.h @@ -67,7 +67,7 @@ class WarpPointRigid6D : public WarpPointRigid(6) {} /** \brief Empty destructor */ - ~WarpPointRigid6D() {} + ~WarpPointRigid6D() override = default; /** \brief Set warp parameters. * \note Assumes the quaternion parameters are normalized. diff --git a/sample_consensus/include/pcl/sample_consensus/sac.h b/sample_consensus/include/pcl/sample_consensus/sac.h index 0c28f5a17b2..ba9e038cc8c 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac.h +++ b/sample_consensus/include/pcl/sample_consensus/sac.h @@ -63,7 +63,7 @@ namespace pcl private: /** \brief Constructor for base SAC. */ - SampleConsensus () {}; + SampleConsensus () = default;; public: using Ptr = shared_ptr >; @@ -130,7 +130,7 @@ namespace pcl } /** \brief Destructor for base SAC. */ - virtual ~SampleConsensus () {}; + virtual ~SampleConsensus () = default;; /** \brief Set the distance to model threshold. * \param[in] threshold distance to model threshold diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model.h b/sample_consensus/include/pcl/sample_consensus/sac_model.h index 2fc9ef72388..5706d852dde 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model.h @@ -162,7 +162,7 @@ namespace pcl }; /** \brief Destructor for base SampleConsensusModel. */ - virtual ~SampleConsensusModel () {}; + virtual ~SampleConsensusModel () = default;; /** \brief Get a set of random data samples and return them as point * indices. @@ -621,7 +621,7 @@ namespace pcl SampleConsensusModelFromNormals () : normal_distance_weight_ (0.0), normals_ () {}; /** \brief Destructor. */ - virtual ~SampleConsensusModelFromNormals () {} + virtual ~SampleConsensusModelFromNormals () = default; /** \brief Set the normal angular distance weight. * \param[in] w the relative weight (between 0 and 1) to give to the angular @@ -696,7 +696,7 @@ namespace pcl */ Functor (int m_data_points) : m_data_points_ (m_data_points) {} - virtual ~Functor () {} + virtual ~Functor () = default; /** \brief Get the number of values. */ int diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_circle.h b/sample_consensus/include/pcl/sample_consensus/sac_model_circle.h index 6f35d9e0eba..2dc17c4a0f2 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_circle.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_circle.h @@ -118,7 +118,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelCircle2D () {} + ~SampleConsensusModelCircle2D () override = default; /** \brief Copy constructor. * \param[in] source the model to copy into this diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_circle3d.h b/sample_consensus/include/pcl/sample_consensus/sac_model_circle3d.h index c523aabe55c..d4c6e53d980 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_circle3d.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_circle3d.h @@ -102,7 +102,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelCircle3D () {} + ~SampleConsensusModelCircle3D () override = default; /** \brief Copy constructor. * \param[in] source the model to copy into this diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_cone.h b/sample_consensus/include/pcl/sample_consensus/sac_model_cone.h index 9fe7dcbf6f0..d96a0d764b8 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_cone.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_cone.h @@ -128,7 +128,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelCone () {} + ~SampleConsensusModelCone () override = default; /** \brief Copy constructor. * \param[in] source the model to copy into this diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_cylinder.h b/sample_consensus/include/pcl/sample_consensus/sac_model_cylinder.h index 889f436e21d..7a45f26ff66 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_cylinder.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_cylinder.h @@ -126,7 +126,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelCylinder () {} + ~SampleConsensusModelCylinder () override = default; /** \brief Copy constructor. * \param[in] source the model to copy into this diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_line.h b/sample_consensus/include/pcl/sample_consensus/sac_model_line.h index 385bdc41376..a4b5103c1d5 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_line.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_line.h @@ -102,7 +102,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelLine () {} + ~SampleConsensusModelLine () override = default; /** \brief Check whether the given index samples can form a valid line model, compute the model coefficients from * these samples and store them internally in model_coefficients_. The line coefficients are represented by a diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_normal_parallel_plane.h b/sample_consensus/include/pcl/sample_consensus/sac_model_normal_parallel_plane.h index d92cf870bce..f90dc1eed28 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_normal_parallel_plane.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_normal_parallel_plane.h @@ -142,7 +142,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelNormalParallelPlane () {} + ~SampleConsensusModelNormalParallelPlane () override = default; /** \brief Set the axis along which we need to search for a plane perpendicular to. * \param[in] ax the axis along which we need to search for a plane perpendicular to diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_normal_plane.h b/sample_consensus/include/pcl/sample_consensus/sac_model_normal_plane.h index b8164cbbd3b..f43f1454c5d 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_normal_plane.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_normal_plane.h @@ -125,7 +125,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelNormalPlane () {} + ~SampleConsensusModelNormalPlane () override = default; /** \brief Select all the points which respect the given model coefficients as inliers. * \param[in] model_coefficients the coefficients of a plane model that we need to compute distances to diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_normal_sphere.h b/sample_consensus/include/pcl/sample_consensus/sac_model_normal_sphere.h index 2bb45c0b5d1..2f9a9069c8c 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_normal_sphere.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_normal_sphere.h @@ -119,7 +119,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelNormalSphere () {} + ~SampleConsensusModelNormalSphere () override = default; /** \brief Select all the points which respect the given model coefficients as inliers. * \param[in] model_coefficients the coefficients of a sphere model that we need to compute distances to diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_line.h b/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_line.h index c3cd3debede..4d80e9936e4 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_line.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_line.h @@ -107,7 +107,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelParallelLine () {} + ~SampleConsensusModelParallelLine () override = default; /** \brief Set the axis along which we need to search for a line. * \param[in] ax the axis along which we need to search for a line diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_plane.h b/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_plane.h index a3c82db8396..9d7b3054238 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_plane.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_parallel_plane.h @@ -109,7 +109,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelParallelPlane () {} + ~SampleConsensusModelParallelPlane () override = default; /** \brief Set the axis along which we need to search for a plane perpendicular to. * \param[in] ax the axis along which we need to search for a plane perpendicular to diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_perpendicular_plane.h b/sample_consensus/include/pcl/sample_consensus/sac_model_perpendicular_plane.h index 2f649460451..88952f6a1f0 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_perpendicular_plane.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_perpendicular_plane.h @@ -112,7 +112,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelPerpendicularPlane () {} + ~SampleConsensusModelPerpendicularPlane () override = default; /** \brief Set the axis along which we need to search for a plane perpendicular to. * \param[in] ax the axis along which we need to search for a plane perpendicular to diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_plane.h b/sample_consensus/include/pcl/sample_consensus/sac_model_plane.h index 5a71c5d4c94..2bee660a23f 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_plane.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_plane.h @@ -183,7 +183,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelPlane () {} + ~SampleConsensusModelPlane () override = default; /** \brief Check whether the given index samples can form a valid plane model, compute the model coefficients from * these samples and store them internally in model_coefficients_. The plane coefficients are: diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_registration.h b/sample_consensus/include/pcl/sample_consensus/sac_model_registration.h index 51b9b13ea5c..37f6209d025 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_registration.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_registration.h @@ -111,7 +111,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelRegistration () {} + ~SampleConsensusModelRegistration () override = default; /** \brief Provide a pointer to the input dataset * \param[in] cloud the const boost shared pointer to a PointCloud message diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_registration_2d.h b/sample_consensus/include/pcl/sample_consensus/sac_model_registration_2d.h index 82f16adef47..d46d775446d 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_registration_2d.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_registration_2d.h @@ -105,7 +105,7 @@ namespace pcl } /** \brief Empty destructor */ - virtual ~SampleConsensusModelRegistration2D () {} + virtual ~SampleConsensusModelRegistration2D () = default; /** \brief Compute all distances from the transformed points to their correspondences * \param[in] model_coefficients the 4x4 transformation matrix diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_sphere.h b/sample_consensus/include/pcl/sample_consensus/sac_model_sphere.h index 6840e0bee02..44dca3591af 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_sphere.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_sphere.h @@ -109,7 +109,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelSphere () {} + ~SampleConsensusModelSphere () override = default; /** \brief Copy constructor. * \param[in] source the model to copy into this diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model_stick.h b/sample_consensus/include/pcl/sample_consensus/sac_model_stick.h index 9f7f4f3b39b..14805c67e94 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model_stick.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model_stick.h @@ -107,7 +107,7 @@ namespace pcl } /** \brief Empty destructor */ - ~SampleConsensusModelStick () {} + ~SampleConsensusModelStick () override = default; /** \brief Check whether the given index samples can form a valid stick model, compute the model coefficients from * these samples and store them internally in model_coefficients_. The stick coefficients are represented by a diff --git a/search/include/pcl/search/brute_force.h b/search/include/pcl/search/brute_force.h index 4104e1fc121..50d771edf97 100644 --- a/search/include/pcl/search/brute_force.h +++ b/search/include/pcl/search/brute_force.h @@ -91,9 +91,8 @@ namespace pcl /** \brief Destructor for KdTree. */ - ~BruteForce () - { - } + ~BruteForce () override + = default; /** \brief Search for the k-nearest neighbors for the given query point. * \param[in] point the given query point diff --git a/search/include/pcl/search/kdtree.h b/search/include/pcl/search/kdtree.h index b0e48a088b4..074c4a97618 100644 --- a/search/include/pcl/search/kdtree.h +++ b/search/include/pcl/search/kdtree.h @@ -90,9 +90,8 @@ namespace pcl /** \brief Destructor for KdTree. */ - ~KdTree () - { - } + ~KdTree () override + = default; /** \brief Provide a pointer to the point representation to use to convert points into k-D vectors. * \param[in] point_representation the const boost shared pointer to a PointRepresentation diff --git a/search/include/pcl/search/octree.h b/search/include/pcl/search/octree.h index 0df81f3d311..e6bff6ce7c4 100644 --- a/search/include/pcl/search/octree.h +++ b/search/include/pcl/search/octree.h @@ -96,9 +96,8 @@ namespace pcl /** \brief Empty Destructor. */ - ~Octree () - { - } + ~Octree () override + = default; /** \brief Provide a pointer to the input dataset. * \param[in] cloud the const boost shared pointer to a PointCloud message diff --git a/search/include/pcl/search/organized.h b/search/include/pcl/search/organized.h index c11013279ce..138759f0bfd 100644 --- a/search/include/pcl/search/organized.h +++ b/search/include/pcl/search/organized.h @@ -93,7 +93,7 @@ namespace pcl } /** \brief Empty deconstructor. */ - ~OrganizedNeighbor () {} + ~OrganizedNeighbor () override = default; /** \brief Test whether this search-object is valid (input is organized AND from projective device) * User should use this method after setting the input cloud, since setInput just prints an error diff --git a/search/include/pcl/search/search.h b/search/include/pcl/search/search.h index 201b92568a9..def848bd9f6 100644 --- a/search/include/pcl/search/search.h +++ b/search/include/pcl/search/search.h @@ -90,8 +90,7 @@ namespace pcl /** Destructor. */ virtual ~Search () - { - } + = default; /** \brief Returns the search method name */ diff --git a/segmentation/include/pcl/segmentation/approximate_progressive_morphological_filter.h b/segmentation/include/pcl/segmentation/approximate_progressive_morphological_filter.h index f98b3a2bfc0..bc99e831d48 100644 --- a/segmentation/include/pcl/segmentation/approximate_progressive_morphological_filter.h +++ b/segmentation/include/pcl/segmentation/approximate_progressive_morphological_filter.h @@ -70,7 +70,7 @@ namespace pcl ApproximateProgressiveMorphologicalFilter (); - ~ApproximateProgressiveMorphologicalFilter (); + ~ApproximateProgressiveMorphologicalFilter () override; /** \brief Get the maximum window size to be used in filtering ground returns. */ inline int diff --git a/segmentation/include/pcl/segmentation/comparator.h b/segmentation/include/pcl/segmentation/comparator.h index a08c4857dad..e14178bebc6 100644 --- a/segmentation/include/pcl/segmentation/comparator.h +++ b/segmentation/include/pcl/segmentation/comparator.h @@ -69,8 +69,7 @@ namespace pcl /** \brief Empty destructor for comparator. */ virtual ~Comparator () - { - } + = default; /** \brief Set the input cloud for the comparator. * \param[in] cloud the point cloud this comparator will operate on diff --git a/segmentation/include/pcl/segmentation/cpc_segmentation.h b/segmentation/include/pcl/segmentation/cpc_segmentation.h index cb5236bdf7f..cb665b0b7f4 100644 --- a/segmentation/include/pcl/segmentation/cpc_segmentation.h +++ b/segmentation/include/pcl/segmentation/cpc_segmentation.h @@ -88,7 +88,7 @@ namespace pcl public: CPCSegmentation (); - ~CPCSegmentation (); + ~CPCSegmentation () override; /** \brief Merge supervoxels using cuts through local convexities. The input parameters are generated by using the \ref SupervoxelClustering class. To retrieve the output use the \ref relabelCloud method. * \note There are three ways to retrieve the segmentation afterwards (inherited from \ref LCCPSegmentation): \ref relabelCloud, \ref getSupervoxelToSegmentMap and \ref getSupervoxelToSegmentMap */ diff --git a/segmentation/include/pcl/segmentation/grabcut_segmentation.h b/segmentation/include/pcl/segmentation/grabcut_segmentation.h index 0e1eed8e879..f7435da6d22 100644 --- a/segmentation/include/pcl/segmentation/grabcut_segmentation.h +++ b/segmentation/include/pcl/segmentation/grabcut_segmentation.h @@ -69,7 +69,7 @@ namespace pcl /// construct a maxflow/mincut problem with estimated max_nodes BoykovKolmogorov (std::size_t max_nodes = 0); /// destructor - virtual ~BoykovKolmogorov () {} + virtual ~BoykovKolmogorov () = default; /// get number of nodes in the graph std::size_t numNodes () const { return nodes_.size (); } @@ -202,7 +202,7 @@ namespace pcl /// Gaussian structure struct Gaussian { - Gaussian () {} + Gaussian () = default; /// mean of the gaussian Color mu; /// covariance matrix of the gaussian @@ -227,7 +227,7 @@ namespace pcl /// Initialize GMM with ddesired number of gaussians. GMM (std::size_t K) : gaussians_ (K) {} /// Destructor - ~GMM () {} + ~GMM () = default; /// \return K std::size_t getK () const { return gaussians_.size (); } @@ -336,7 +336,7 @@ namespace pcl , initialized_ (false) {} /// Destructor - ~GrabCut () {}; + ~GrabCut () = default;; // /// Set input cloud void setInputCloud (const PointCloudConstPtr& cloud) override; diff --git a/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp b/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp index f9bd7c30d18..e78228c1ced 100644 --- a/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp +++ b/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp @@ -64,8 +64,7 @@ pcl::ApproximateProgressiveMorphologicalFilter::ApproximateProgressiveMo ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::ApproximateProgressiveMorphologicalFilter::~ApproximateProgressiveMorphologicalFilter () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp index 1f92f39a7ba..89113d47262 100644 --- a/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp @@ -54,8 +54,7 @@ pcl::CPCSegmentation::CPCSegmentation () : template pcl::CPCSegmentation::~CPCSegmentation () -{ -} += default; template void pcl::CPCSegmentation::segment () diff --git a/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp index 360749e6d5f..f7272108e7e 100644 --- a/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp @@ -48,14 +48,12 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::CrfNormalSegmentation::CrfNormalSegmentation () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::CrfNormalSegmentation::~CrfNormalSegmentation () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp index 14821ea6ae8..b882ca52031 100644 --- a/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp @@ -64,8 +64,7 @@ pcl::CrfSegmentation::CrfSegmentation () : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::CrfSegmentation::~CrfSegmentation () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp index f2a8730b008..7aa6607398d 100644 --- a/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp @@ -67,8 +67,7 @@ pcl::LCCPSegmentation::LCCPSegmentation () : template pcl::LCCPSegmentation::~LCCPSegmentation () -{ -} += default; template void pcl::LCCPSegmentation::reset () diff --git a/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp b/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp index d930431a6f7..9130b753856 100644 --- a/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp +++ b/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp @@ -62,8 +62,7 @@ pcl::ProgressiveMorphologicalFilter::ProgressiveMorphologicalFilter () : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::ProgressiveMorphologicalFilter::~ProgressiveMorphologicalFilter () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp b/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp index 26a7ca5e431..b933ba35494 100644 --- a/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp +++ b/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp @@ -61,9 +61,7 @@ pcl::SupervoxelClustering::SupervoxelClustering (float voxel_resolution, ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::SupervoxelClustering::~SupervoxelClustering () -{ - -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp b/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp index cf0e9b05bd9..cc208fc331d 100644 --- a/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp +++ b/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp @@ -63,8 +63,7 @@ pcl::UnaryClassifier::UnaryClassifier () : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template pcl::UnaryClassifier::~UnaryClassifier () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/min_cut_segmentation.h b/segmentation/include/pcl/segmentation/min_cut_segmentation.h index f2a26897790..c038a1141d7 100644 --- a/segmentation/include/pcl/segmentation/min_cut_segmentation.h +++ b/segmentation/include/pcl/segmentation/min_cut_segmentation.h @@ -111,7 +111,7 @@ namespace pcl /** \brief Destructor that frees memory. */ - ~MinCutSegmentation (); + ~MinCutSegmentation () override; /** \brief This method simply sets the input point cloud. * \param[in] cloud the const boost shared pointer to a PointCloud diff --git a/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h b/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h index 99c452450ba..f29007e1fad 100644 --- a/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h +++ b/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h @@ -85,9 +85,8 @@ namespace pcl /** \brief Destructor for OrganizedConnectedComponentSegmentation. */ - ~OrganizedConnectedComponentSegmentation () - { - } + ~OrganizedConnectedComponentSegmentation () override + = default; /** \brief Provide a pointer to the comparator to be used for segmentation. * \param[in] compare the comparator diff --git a/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h b/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h index b4fa41a0bac..7e303e8b12a 100644 --- a/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h +++ b/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h @@ -102,9 +102,8 @@ namespace pcl /** \brief Destructor for OrganizedMultiPlaneSegmentation. */ - ~OrganizedMultiPlaneSegmentation () - { - } + ~OrganizedMultiPlaneSegmentation () override + = default; /** \brief Provide a pointer to the input normals. * \param[in] normals the input normal cloud diff --git a/segmentation/include/pcl/segmentation/planar_polygon_fusion.h b/segmentation/include/pcl/segmentation/planar_polygon_fusion.h index 977ec8e0e85..d537d25f1c6 100644 --- a/segmentation/include/pcl/segmentation/planar_polygon_fusion.h +++ b/segmentation/include/pcl/segmentation/planar_polygon_fusion.h @@ -55,7 +55,7 @@ namespace pcl PlanarPolygonFusion () : regions_ () {} /** \brief Destructor */ - virtual ~PlanarPolygonFusion () {} + virtual ~PlanarPolygonFusion () = default; /** \brief Reset the state (clean the list of planar models). */ void diff --git a/segmentation/include/pcl/segmentation/planar_region.h b/segmentation/include/pcl/segmentation/planar_region.h index 5897ce27831..8ed517318ea 100644 --- a/segmentation/include/pcl/segmentation/planar_region.h +++ b/segmentation/include/pcl/segmentation/planar_region.h @@ -60,7 +60,7 @@ namespace pcl public: /** \brief Empty constructor for PlanarRegion. */ PlanarRegion () - {} + = default; /** \brief Constructor for Planar region from a Region3D and a PlanarPolygon. * \param[in] region a Region3D for the input data @@ -76,7 +76,7 @@ namespace pcl } /** \brief Destructor. */ - ~PlanarRegion () {} + ~PlanarRegion () override = default; /** \brief Constructor for PlanarRegion. * \param[in] centroid the centroid of the region. diff --git a/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h b/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h index 7d2c4c430aa..ece87f4981c 100644 --- a/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h +++ b/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h @@ -92,9 +92,8 @@ namespace pcl /** \brief Destructor for PlaneCoefficientComparator. */ - ~PlaneCoefficientComparator () - { - } + ~PlaneCoefficientComparator () override + = default; void setInputCloud (const PointCloudConstPtr& cloud) override diff --git a/segmentation/include/pcl/segmentation/plane_refinement_comparator.h b/segmentation/include/pcl/segmentation/plane_refinement_comparator.h index 5a23c5e4111..cdf76fc08b2 100644 --- a/segmentation/include/pcl/segmentation/plane_refinement_comparator.h +++ b/segmentation/include/pcl/segmentation/plane_refinement_comparator.h @@ -95,9 +95,8 @@ namespace pcl } /** \brief Destructor for PlaneCoefficientComparator. */ - ~PlaneRefinementComparator () - { - } + ~PlaneRefinementComparator () override + = default; /** \brief Set the vector of model coefficients to which we will compare. * \param[in] models a vector of model coefficients produced by the initial segmentation step. diff --git a/segmentation/include/pcl/segmentation/progressive_morphological_filter.h b/segmentation/include/pcl/segmentation/progressive_morphological_filter.h index 92748346366..f48f25a1282 100644 --- a/segmentation/include/pcl/segmentation/progressive_morphological_filter.h +++ b/segmentation/include/pcl/segmentation/progressive_morphological_filter.h @@ -69,7 +69,7 @@ namespace pcl ProgressiveMorphologicalFilter (); - ~ProgressiveMorphologicalFilter (); + ~ProgressiveMorphologicalFilter () override; /** \brief Get the maximum window size to be used in filtering ground returns. */ inline int diff --git a/segmentation/include/pcl/segmentation/region_3d.h b/segmentation/include/pcl/segmentation/region_3d.h index e9304d012c7..3429579d272 100644 --- a/segmentation/include/pcl/segmentation/region_3d.h +++ b/segmentation/include/pcl/segmentation/region_3d.h @@ -67,7 +67,7 @@ namespace pcl } /** \brief Destructor. */ - virtual ~Region3D () {} + virtual ~Region3D () = default; /** \brief Get the centroid of the region. */ inline Eigen::Vector3f diff --git a/segmentation/include/pcl/segmentation/region_growing.h b/segmentation/include/pcl/segmentation/region_growing.h index 7f70084ca71..ec62be9906f 100644 --- a/segmentation/include/pcl/segmentation/region_growing.h +++ b/segmentation/include/pcl/segmentation/region_growing.h @@ -81,7 +81,7 @@ namespace pcl * finding KNN. In other words it frees memory. */ - ~RegionGrowing (); + ~RegionGrowing () override; /** \brief Get the minimum number of points that a cluster needs to contain in order to be considered valid. */ int diff --git a/segmentation/include/pcl/segmentation/region_growing_rgb.h b/segmentation/include/pcl/segmentation/region_growing_rgb.h index dff7fa50a28..d51d25c2021 100644 --- a/segmentation/include/pcl/segmentation/region_growing_rgb.h +++ b/segmentation/include/pcl/segmentation/region_growing_rgb.h @@ -88,7 +88,7 @@ namespace pcl /** \brief Destructor that frees memory. */ - ~RegionGrowingRGB (); + ~RegionGrowingRGB () override; /** \brief Returns the color threshold value used for testing if points belong to the same region. */ float diff --git a/segmentation/include/pcl/segmentation/sac_segmentation.h b/segmentation/include/pcl/segmentation/sac_segmentation.h index 2add3f735e0..578b8416b1c 100644 --- a/segmentation/include/pcl/segmentation/sac_segmentation.h +++ b/segmentation/include/pcl/segmentation/sac_segmentation.h @@ -102,7 +102,7 @@ namespace pcl } /** \brief Empty destructor. */ - ~SACSegmentation () { /*srv_.reset ();*/ }; + ~SACSegmentation () override { /*srv_.reset ();*/ }; /** \brief The type of model to use (user given parameter). * \param[in] model the model type (check \a model_types.h) diff --git a/segmentation/include/pcl/segmentation/supervoxel_clustering.h b/segmentation/include/pcl/segmentation/supervoxel_clustering.h index c3aa569afbb..783ecf691d6 100644 --- a/segmentation/include/pcl/segmentation/supervoxel_clustering.h +++ b/segmentation/include/pcl/segmentation/supervoxel_clustering.h @@ -199,7 +199,7 @@ namespace pcl * finding neighbors. In other words it frees memory. */ - ~SupervoxelClustering (); + ~SupervoxelClustering () override; /** \brief Set the resolution of the octree voxels */ void diff --git a/stereo/include/pcl/stereo/digital_elevation_map.h b/stereo/include/pcl/stereo/digital_elevation_map.h index 21f7824fc0b..9a4cd8c0afa 100644 --- a/stereo/include/pcl/stereo/digital_elevation_map.h +++ b/stereo/include/pcl/stereo/digital_elevation_map.h @@ -88,7 +88,7 @@ class PCL_EXPORTS DigitalElevationMapBuilder : public DisparityMapConverter::DisparityMapConverter() template pcl::DisparityMapConverter::~DisparityMapConverter() -{} += default; template inline void diff --git a/stereo/include/pcl/stereo/stereo_grabber.h b/stereo/include/pcl/stereo/stereo_grabber.h index dcad8bd6670..a5478afc0ed 100644 --- a/stereo/include/pcl/stereo/stereo_grabber.h +++ b/stereo/include/pcl/stereo/stereo_grabber.h @@ -73,7 +73,7 @@ class PCL_EXPORTS StereoGrabberBase : public Grabber { bool repeat); /** \brief Virtual destructor. */ - ~StereoGrabberBase() noexcept; + ~StereoGrabberBase() noexcept override; /** \brief Starts playing the list of Stereo images if frames_per_second is > 0. * Otherwise it works as a trigger: publishes only the next pair in the list. */ diff --git a/stereo/include/pcl/stereo/stereo_matching.h b/stereo/include/pcl/stereo/stereo_matching.h index 1b98fe41b69..cb007ce89f8 100644 --- a/stereo/include/pcl/stereo/stereo_matching.h +++ b/stereo/include/pcl/stereo/stereo_matching.h @@ -371,7 +371,7 @@ class PCL_EXPORTS StereoMatching { class PCL_EXPORTS GrayStereoMatching : public StereoMatching { public: GrayStereoMatching(); - ~GrayStereoMatching(); + ~GrayStereoMatching() override; /** \brief stereo processing, it computes a disparity map stored internally by the * class @@ -428,7 +428,7 @@ class PCL_EXPORTS GrayStereoMatching : public StereoMatching { class PCL_EXPORTS BlockBasedStereoMatching : public GrayStereoMatching { public: BlockBasedStereoMatching(); - ~BlockBasedStereoMatching(){}; + ~BlockBasedStereoMatching() override= default;; /** \brief setter for the radius of the squared window * \param[in] radius radius of the squared window used to compute the block-based @@ -465,7 +465,7 @@ class PCL_EXPORTS AdaptiveCostSOStereoMatching : public GrayStereoMatching { public: AdaptiveCostSOStereoMatching(); - ~AdaptiveCostSOStereoMatching(){}; + ~AdaptiveCostSOStereoMatching() override= default;; /** \brief setter for the radius (half length) of the column used for cost aggregation * \param[in] radius radius (half length) of the column used for cost aggregation; the diff --git a/stereo/src/digital_elevation_map.cpp b/stereo/src/digital_elevation_map.cpp index e96dc3a7555..da8d0302c17 100644 --- a/stereo/src/digital_elevation_map.cpp +++ b/stereo/src/digital_elevation_map.cpp @@ -42,7 +42,7 @@ pcl::DigitalElevationMapBuilder::DigitalElevationMapBuilder() : resolution_column_(64), resolution_disparity_(32), min_points_in_cell_(1) {} -pcl::DigitalElevationMapBuilder::~DigitalElevationMapBuilder() {} +pcl::DigitalElevationMapBuilder::~DigitalElevationMapBuilder() = default; void pcl::DigitalElevationMapBuilder::setResolution(std::size_t resolution_column, diff --git a/stereo/src/stereo_matching.cpp b/stereo/src/stereo_matching.cpp index 66b4d0d1009..dff029bee10 100644 --- a/stereo/src/stereo_matching.cpp +++ b/stereo/src/stereo_matching.cpp @@ -329,10 +329,10 @@ pcl::StereoMatching::getPointCloud(float u_c, } ////////////////////////////////////////////////////////////////////////////// -pcl::GrayStereoMatching::GrayStereoMatching() {} +pcl::GrayStereoMatching::GrayStereoMatching() = default; ////////////////////////////////////////////////////////////////////////////// -pcl::GrayStereoMatching::~GrayStereoMatching() {} +pcl::GrayStereoMatching::~GrayStereoMatching() = default; ////////////////////////////////////////////////////////////////////////////// void diff --git a/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.h b/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.h index 8767d7a251e..66c8ac4cf56 100644 --- a/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.h +++ b/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.h @@ -52,7 +52,7 @@ namespace pcl Polynomial< Degree > polys[Degree+1]; Polynomial< Degree >& operator[] ( int idx ) { return polys[idx]; } const Polynomial< Degree >& operator[] ( int idx ) const { return polys[idx]; } - void printnl( void ) const { for( int d=0 ; d<=Degree ; d++ ) polys[d].printnl(); } + void printnl( ) const { for( int d=0 ; d<=Degree ; d++ ) polys[d].printnl(); } BSplineComponents scale( double s ) const { BSplineComponents b ; for( int d=0 ; d<=Degree ; d++ ) b[d] = polys[d].scale(s) ; return b; } BSplineComponents shift( double s ) const { BSplineComponents b ; for( int d=0 ; d<=Degree ; d++ ) b[d] = polys[d].shift(s) ; return b; } }; @@ -71,15 +71,15 @@ namespace pcl PPolynomial* baseFunctions; BSplineComponents* baseBSplines; - BSplineData(void); - ~BSplineData(void); + BSplineData(); + ~BSplineData(); virtual void setDotTables( int flags ); virtual void clearDotTables( int flags ); virtual void setValueTables( int flags,double smooth=0); virtual void setValueTables( int flags,double valueSmooth,double normalSmooth); - virtual void clearValueTables(void); + virtual void clearValueTables(); void setSampleSpan( int idx , int& start , int& end , double smooth=0 ) const; @@ -103,7 +103,7 @@ namespace pcl struct BSplineElementCoefficients { int coeffs[Degree+1]; - BSplineElementCoefficients( void ) { memset( coeffs , 0 , sizeof( int ) * ( Degree+1 ) ); } + BSplineElementCoefficients( ) { memset( coeffs , 0 , sizeof( int ) * ( Degree+1 ) ); } int& operator[]( int idx ){ return coeffs[idx]; } const int& operator[]( int idx ) const { return coeffs[idx]; } }; @@ -123,7 +123,7 @@ namespace pcl // Coefficients are ordered as "/" "-" "\" int denominator; - BSplineElements( void ) { denominator = 1; } + BSplineElements( ) { denominator = 1; } BSplineElements( int res , int offset , int boundary=NONE ); void upSample( BSplineElements& high ) const; diff --git a/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.hpp b/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.hpp index 83db59b9198..c0f590bbaa9 100644 --- a/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.hpp +++ b/surface/include/pcl/surface/3rdparty/poisson4/bspline_data.hpp @@ -81,7 +81,7 @@ namespace pcl } template< int Degree , class Real > - BSplineData::BSplineData( void ) + BSplineData::BSplineData( ) { vvDotTable = dvDotTable = ddDotTable = NULL; valueTables = dValueTables = NULL; @@ -91,7 +91,7 @@ namespace pcl } template< int Degree , class Real > - BSplineData< Degree , Real >::~BSplineData(void) + BSplineData< Degree , Real >::~BSplineData() { if( functionCount ) { @@ -368,7 +368,7 @@ namespace pcl template - void BSplineData::clearValueTables(void){ + void BSplineData::clearValueTables(){ delete[] valueTables; delete[] dValueTables; valueTables=dValueTables=NULL; diff --git a/surface/include/pcl/surface/bilateral_upsampling.h b/surface/include/pcl/surface/bilateral_upsampling.h index 193e64dd1a3..6fac8ce58b0 100644 --- a/surface/include/pcl/surface/bilateral_upsampling.h +++ b/surface/include/pcl/surface/bilateral_upsampling.h @@ -64,7 +64,7 @@ namespace pcl { public: typedef shared_ptr > Ptr; - typedef shared_ptr > ConstPtr; + using ConstPtr = shared_ptr >; using PCLBase::input_; using PCLBase::indices_; diff --git a/surface/include/pcl/surface/concave_hull.h b/surface/include/pcl/surface/concave_hull.h index c9640a6a194..dc7ab370251 100644 --- a/surface/include/pcl/surface/concave_hull.h +++ b/surface/include/pcl/surface/concave_hull.h @@ -76,7 +76,7 @@ namespace pcl }; /** \brief Empty destructor */ - ~ConcaveHull () {} + ~ConcaveHull () override = default; /** \brief Compute a concave hull for all points given * diff --git a/surface/include/pcl/surface/convex_hull.h b/surface/include/pcl/surface/convex_hull.h index d82bbf0b0ea..f34e4b157fa 100644 --- a/surface/include/pcl/surface/convex_hull.h +++ b/surface/include/pcl/surface/convex_hull.h @@ -95,7 +95,7 @@ namespace pcl }; /** \brief Empty destructor */ - ~ConvexHull () {} + ~ConvexHull () override = default; /** \brief Compute a convex hull for all points given. * diff --git a/surface/include/pcl/surface/ear_clipping.h b/surface/include/pcl/surface/ear_clipping.h index e811a706435..a4c7c33ad23 100644 --- a/surface/include/pcl/surface/ear_clipping.h +++ b/surface/include/pcl/surface/ear_clipping.h @@ -59,8 +59,7 @@ namespace pcl using MeshProcessing::initCompute; /** \brief Empty constructor */ EarClipping () - { - }; + = default;; protected: /** \brief a Pointer to the point cloud data. */ diff --git a/surface/include/pcl/surface/grid_projection.h b/surface/include/pcl/surface/grid_projection.h index 92f04aae66e..2c760956263 100644 --- a/surface/include/pcl/surface/grid_projection.h +++ b/surface/include/pcl/surface/grid_projection.h @@ -89,7 +89,7 @@ namespace pcl /** \brief Data leaf. */ struct Leaf { - Leaf () {} + Leaf () = default; pcl::Indices data_indices; Eigen::Vector4f pt_on_surface; @@ -107,7 +107,7 @@ namespace pcl GridProjection (double in_resolution); /** \brief Destructor. */ - ~GridProjection (); + ~GridProjection () override; /** \brief Set the size of the grid cell * \param resolution the size of the grid cell diff --git a/surface/include/pcl/surface/impl/marching_cubes.hpp b/surface/include/pcl/surface/impl/marching_cubes.hpp index 03984fd930a..5869aeb200e 100644 --- a/surface/include/pcl/surface/impl/marching_cubes.hpp +++ b/surface/include/pcl/surface/impl/marching_cubes.hpp @@ -44,8 +44,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::MarchingCubes::~MarchingCubes () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp b/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp index 91e7d680c6b..6dba8205ba5 100644 --- a/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp +++ b/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp @@ -41,8 +41,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::MarchingCubesHoppe::~MarchingCubesHoppe () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp b/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp index f33351201bf..73949e053be 100644 --- a/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp +++ b/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp @@ -44,8 +44,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::MarchingCubesRBF::~MarchingCubesRBF () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/include/pcl/surface/impl/poisson.hpp b/surface/include/pcl/surface/impl/poisson.hpp index 1f626e69316..d564c1fca00 100644 --- a/surface/include/pcl/surface/impl/poisson.hpp +++ b/surface/include/pcl/surface/impl/poisson.hpp @@ -88,8 +88,7 @@ pcl::Poisson::Poisson () ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::Poisson::~Poisson () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/include/pcl/surface/marching_cubes.h b/surface/include/pcl/surface/marching_cubes.h index e6fd2adae73..97296ad05e6 100644 --- a/surface/include/pcl/surface/marching_cubes.h +++ b/surface/include/pcl/surface/marching_cubes.h @@ -383,7 +383,7 @@ namespace pcl } /** \brief Destructor. */ - ~MarchingCubes (); + ~MarchingCubes () override; /** \brief Method that sets the iso level of the surface to be extracted. diff --git a/surface/include/pcl/surface/marching_cubes_hoppe.h b/surface/include/pcl/surface/marching_cubes_hoppe.h index 9e4b0722332..f1014a7c928 100644 --- a/surface/include/pcl/surface/marching_cubes_hoppe.h +++ b/surface/include/pcl/surface/marching_cubes_hoppe.h @@ -81,7 +81,7 @@ namespace pcl } /** \brief Destructor. */ - ~MarchingCubesHoppe (); + ~MarchingCubesHoppe () override; /** \brief Convert the point cloud into voxel data. */ diff --git a/surface/include/pcl/surface/marching_cubes_rbf.h b/surface/include/pcl/surface/marching_cubes_rbf.h index fda659c3d83..e2e7eadd9ae 100644 --- a/surface/include/pcl/surface/marching_cubes_rbf.h +++ b/surface/include/pcl/surface/marching_cubes_rbf.h @@ -83,7 +83,7 @@ namespace pcl } /** \brief Destructor. */ - ~MarchingCubesRBF (); + ~MarchingCubesRBF () override; /** \brief Convert the point cloud into voxel data. */ diff --git a/surface/include/pcl/surface/mls.h b/surface/include/pcl/surface/mls.h index 1af7a8dd80c..83355227396 100644 --- a/surface/include/pcl/surface/mls.h +++ b/surface/include/pcl/surface/mls.h @@ -262,7 +262,7 @@ namespace pcl { public: typedef shared_ptr > Ptr; - typedef shared_ptr > ConstPtr; + using ConstPtr = shared_ptr >; using PCLBase::input_; using PCLBase::indices_; @@ -324,7 +324,7 @@ namespace pcl {}; /** \brief Empty destructor */ - ~MovingLeastSquares () {} + ~MovingLeastSquares () override = default; /** \brief Set whether the algorithm should also store the normals computed @@ -628,7 +628,7 @@ namespace pcl point[i] = static_cast (index_3d[i]) * voxel_size_ + bounding_min_[i]; } - typedef std::map HashMap; + using HashMap = std::map; HashMap voxel_grid_; Eigen::Vector4f bounding_min_, bounding_max_; std::uint64_t data_size_; diff --git a/surface/include/pcl/surface/organized_fast_mesh.h b/surface/include/pcl/surface/organized_fast_mesh.h index 23f2b3a525a..21b8f66b53a 100644 --- a/surface/include/pcl/surface/organized_fast_mesh.h +++ b/surface/include/pcl/surface/organized_fast_mesh.h @@ -105,7 +105,7 @@ namespace pcl }; /** \brief Destructor. */ - ~OrganizedFastMesh () {}; + ~OrganizedFastMesh () override = default;; /** \brief Set a maximum edge length. * Using not only the scalar \a a, but also \a b and \a c, allows for using a distance threshold in the form of: diff --git a/surface/include/pcl/surface/poisson.h b/surface/include/pcl/surface/poisson.h index a9ae8656758..9f1e36e9de4 100644 --- a/surface/include/pcl/surface/poisson.h +++ b/surface/include/pcl/surface/poisson.h @@ -76,7 +76,7 @@ namespace pcl Poisson (); /** \brief Destructor. */ - ~Poisson (); + ~Poisson () override; /** \brief Create the surface. * \param[out] output the resultant polygonal mesh diff --git a/surface/include/pcl/surface/processing.h b/surface/include/pcl/surface/processing.h index ed337390d6d..f7ae07b69a0 100644 --- a/surface/include/pcl/surface/processing.h +++ b/surface/include/pcl/surface/processing.h @@ -57,8 +57,8 @@ namespace pcl class CloudSurfaceProcessing : public PCLBase { public: - typedef shared_ptr > Ptr; - typedef shared_ptr > ConstPtr; + using Ptr = shared_ptr >; + using ConstPtr = shared_ptr >; using PCLBase::input_; using PCLBase::indices_; @@ -71,7 +71,7 @@ namespace pcl {}; /** \brief Empty destructor */ - ~CloudSurfaceProcessing () {} + ~CloudSurfaceProcessing () override = default; /** \brief Process the input cloud and store the results * \param[out] output the cloud where the results will be stored @@ -100,10 +100,10 @@ namespace pcl using PolygonMeshConstPtr = PolygonMesh::ConstPtr; /** \brief Constructor. */ - MeshProcessing () {} + MeshProcessing () = default; /** \brief Destructor. */ - virtual ~MeshProcessing () {} + virtual ~MeshProcessing () = default; /** \brief Set the input mesh that we want to process * \param[in] input the input polygonal mesh diff --git a/surface/include/pcl/surface/reconstruction.h b/surface/include/pcl/surface/reconstruction.h index de5939440fd..689bac1f202 100644 --- a/surface/include/pcl/surface/reconstruction.h +++ b/surface/include/pcl/surface/reconstruction.h @@ -68,7 +68,7 @@ namespace pcl PCLSurfaceBase () : tree_ () {} /** \brief Empty destructor */ - ~PCLSurfaceBase () {} + ~PCLSurfaceBase () override = default; /** \brief Provide an optional pointer to a search object. * \param[in] tree a pointer to the spatial search object. @@ -130,7 +130,7 @@ namespace pcl SurfaceReconstruction () : check_tree_ (true) {} /** \brief Destructor. */ - ~SurfaceReconstruction () {} + ~SurfaceReconstruction () override = default; /** \brief Base method for surface reconstruction for all points given in * @@ -199,7 +199,7 @@ namespace pcl MeshConstruction () : check_tree_ (true) {} /** \brief Destructor. */ - ~MeshConstruction () {} + ~MeshConstruction () override = default; /** \brief Base method for surface reconstruction for all points given in * diff --git a/surface/include/pcl/surface/simplification_remove_unused_vertices.h b/surface/include/pcl/surface/simplification_remove_unused_vertices.h index 447d0ce37a0..eb2b415ce80 100644 --- a/surface/include/pcl/surface/simplification_remove_unused_vertices.h +++ b/surface/include/pcl/surface/simplification_remove_unused_vertices.h @@ -55,9 +55,9 @@ namespace pcl using ConstPtr = shared_ptr; /** \brief Constructor. */ - SimplificationRemoveUnusedVertices () {}; + SimplificationRemoveUnusedVertices () = default;; /** \brief Destructor. */ - ~SimplificationRemoveUnusedVertices () {}; + ~SimplificationRemoveUnusedVertices () = default;; /** \brief Simply a polygonal mesh. * \param[in] input the input mesh diff --git a/surface/include/pcl/surface/surfel_smoothing.h b/surface/include/pcl/surface/surfel_smoothing.h index 608140423ab..36a947a20a3 100644 --- a/surface/include/pcl/surface/surfel_smoothing.h +++ b/surface/include/pcl/surface/surfel_smoothing.h @@ -49,8 +49,8 @@ namespace pcl using PCLBase::initCompute; public: - typedef shared_ptr > Ptr; - typedef shared_ptr > ConstPtr; + using Ptr = shared_ptr >; + using ConstPtr = shared_ptr >; using PointCloudIn = pcl::PointCloud; using PointCloudInPtr = typename pcl::PointCloud::Ptr; diff --git a/surface/include/pcl/surface/texture_mapping.h b/surface/include/pcl/surface/texture_mapping.h index 4fa2074a505..0b6be76ecf6 100644 --- a/surface/include/pcl/surface/texture_mapping.h +++ b/surface/include/pcl/surface/texture_mapping.h @@ -123,8 +123,7 @@ namespace pcl /** \brief Destructor. */ ~TextureMapping () - { - } + = default; /** \brief Set mesh scale control * \param[in] f diff --git a/surface/src/3rdparty/poisson4/factor.cpp b/surface/src/3rdparty/poisson4/factor.cpp index cf74b7da255..010238f3a71 100644 --- a/surface/src/3rdparty/poisson4/factor.cpp +++ b/surface/src/3rdparty/poisson4/factor.cpp @@ -29,9 +29,10 @@ DAMAGE. ////////////////////// // Polynomial Roots // ////////////////////// -#include #include +#include + namespace pcl { namespace poisson diff --git a/surface/src/3rdparty/poisson4/geometry.cpp b/surface/src/3rdparty/poisson4/geometry.cpp index 14a12f47bba..75c97caf233 100644 --- a/surface/src/3rdparty/poisson4/geometry.cpp +++ b/surface/src/3rdparty/poisson4/geometry.cpp @@ -35,14 +35,14 @@ namespace pcl namespace poisson { - TriangulationEdge::TriangulationEdge(void){pIndex[0]=pIndex[1]=tIndex[0]=tIndex[1]=-1;} - TriangulationTriangle::TriangulationTriangle(void){eIndex[0]=eIndex[1]=eIndex[2]=-1;} + TriangulationEdge::TriangulationEdge(){pIndex[0]=pIndex[1]=tIndex[0]=tIndex[1]=-1;} + TriangulationTriangle::TriangulationTriangle(){eIndex[0]=eIndex[1]=eIndex[2]=-1;} ///////////////////////// // CoredVectorMeshData // ///////////////////////// - CoredVectorMeshData::CoredVectorMeshData( void ) { oocPointIndex = polygonIndex = 0; } - void CoredVectorMeshData::resetIterator ( void ) { oocPointIndex = polygonIndex = 0; } + CoredVectorMeshData::CoredVectorMeshData( ) { oocPointIndex = polygonIndex = 0; } + void CoredVectorMeshData::resetIterator ( ) { oocPointIndex = polygonIndex = 0; } int CoredVectorMeshData::addOutOfCorePoint(const Point3D& p){ oocPoints.push_back(p); return int(oocPoints.size())-1; @@ -76,14 +76,14 @@ namespace pcl } else return 0; } - int CoredVectorMeshData::outOfCorePointCount(void){return int(oocPoints.size());} - int CoredVectorMeshData::polygonCount( void ) { return int( polygons.size() ); } + int CoredVectorMeshData::outOfCorePointCount(){return int(oocPoints.size());} + int CoredVectorMeshData::polygonCount( ) { return int( polygons.size() ); } ///////////////////////// // CoredVectorMeshData // ///////////////////////// - CoredVectorMeshData2::CoredVectorMeshData2( void ) { oocPointIndex = polygonIndex = 0; } - void CoredVectorMeshData2::resetIterator ( void ) { oocPointIndex = polygonIndex = 0; } + CoredVectorMeshData2::CoredVectorMeshData2( ) { oocPointIndex = polygonIndex = 0; } + void CoredVectorMeshData2::resetIterator ( ) { oocPointIndex = polygonIndex = 0; } int CoredVectorMeshData2::addOutOfCorePoint( const CoredMeshData2::Vertex& v ) { oocPoints.push_back( v ); @@ -120,8 +120,8 @@ namespace pcl } else return 0; } - int CoredVectorMeshData2::outOfCorePointCount(void){return int(oocPoints.size());} - int CoredVectorMeshData2::polygonCount( void ) { return int( polygons.size() ); } + int CoredVectorMeshData2::outOfCorePointCount(){return int(oocPoints.size());} + int CoredVectorMeshData2::polygonCount( ) { return int( polygons.size() ); } } } diff --git a/tools/ensenso_viewer.cpp b/tools/ensenso_viewer.cpp index 4fd95aaee0b..0332d27c79e 100644 --- a/tools/ensenso_viewer.cpp +++ b/tools/ensenso_viewer.cpp @@ -69,7 +69,7 @@ grabberCallback (const PointCloudXYZ::Ptr& cloud) /** @brief Main function * @return Exit status */ int -main (void) +main () { viewer_ptr.reset (new CloudViewer ("Ensenso 3D cloud viewer")); ensenso_ptr.reset (new pcl::EnsensoGrabber); diff --git a/tools/openni_image.cpp b/tools/openni_image.cpp index eff110c069e..7c0e6dc79a8 100644 --- a/tools/openni_image.cpp +++ b/tools/openni_image.cpp @@ -165,7 +165,7 @@ struct Frame class Buffer { public: - Buffer () {} + Buffer () = default; bool pushBack (Frame::ConstPtr frame) diff --git a/tracking/include/pcl/tracking/coherence.h b/tracking/include/pcl/tracking/coherence.h index e3f37ca6981..a8a47729b5f 100644 --- a/tracking/include/pcl/tracking/coherence.h +++ b/tracking/include/pcl/tracking/coherence.h @@ -19,10 +19,10 @@ class PointCoherence { public: /** \brief empty constructor */ - PointCoherence() {} + PointCoherence() = default; /** \brief empty distructor */ - virtual ~PointCoherence() {} + virtual ~PointCoherence() = default; /** \brief compute coherence from the source point to the target point. * \param source instance of source point. @@ -70,7 +70,7 @@ class PointCloudCoherence { PointCloudCoherence() : target_input_(), point_coherences_() {} /** \brief Destructor. */ - virtual ~PointCloudCoherence() {} + virtual ~PointCloudCoherence() = default; /** \brief compute coherence between two pointclouds. */ inline void diff --git a/visualization/include/pcl/visualization/histogram_visualizer.h b/visualization/include/pcl/visualization/histogram_visualizer.h index ba86848b38c..6da04f7f103 100644 --- a/visualization/include/pcl/visualization/histogram_visualizer.h +++ b/visualization/include/pcl/visualization/histogram_visualizer.h @@ -62,7 +62,7 @@ namespace pcl /** \brief PCL histogram visualizer constructor. */ PCLHistogramVisualizer (); - virtual ~PCLHistogramVisualizer () {} + virtual ~PCLHistogramVisualizer () = default; /** \brief Spin once method. Calls the interactor and updates the screen once. * \param[in] time - How long (in ms) should the visualization loop be allowed to run. */ diff --git a/visualization/include/pcl/visualization/image_viewer.h b/visualization/include/pcl/visualization/image_viewer.h index 8d01ba02835..1c2d147332b 100644 --- a/visualization/include/pcl/visualization/image_viewer.h +++ b/visualization/include/pcl/visualization/image_viewer.h @@ -962,7 +962,7 @@ namespace pcl /** \brief Internal structure describing a layer. */ struct Layer { - Layer () {} + Layer () = default; vtkSmartPointer actor; std::string layer_name; }; diff --git a/visualization/include/pcl/visualization/interactor_style.h b/visualization/include/pcl/visualization/interactor_style.h index d1faa0beda1..129612a584d 100644 --- a/visualization/include/pcl/visualization/interactor_style.h +++ b/visualization/include/pcl/visualization/interactor_style.h @@ -122,7 +122,7 @@ namespace pcl {} /** \brief Empty destructor */ - ~PCLVisualizerInteractorStyle () {} + ~PCLVisualizerInteractorStyle () override = default; // this macro defines Superclass, the isA functionality and the safe downcast method vtkTypeMacro (PCLVisualizerInteractorStyle, vtkInteractorStyleRubberBandPick); diff --git a/visualization/include/pcl/visualization/pcl_visualizer.h b/visualization/include/pcl/visualization/pcl_visualizer.h index 64e14ebf8ac..262a3796004 100644 --- a/visualization/include/pcl/visualization/pcl_visualizer.h +++ b/visualization/include/pcl/visualization/pcl_visualizer.h @@ -2045,7 +2045,7 @@ namespace pcl static FPSCallback *New () { return (new FPSCallback); } FPSCallback () : actor (), pcl_visualizer (), decimated (), last_fps(0.0f) {} - FPSCallback (const FPSCallback& src) : vtkCommand (src), actor (src.actor), pcl_visualizer (src.pcl_visualizer), decimated (src.decimated), last_fps (src.last_fps) {} + FPSCallback (const FPSCallback& src) = default; FPSCallback& operator = (const FPSCallback& src) { actor = src.actor; pcl_visualizer = src.pcl_visualizer; decimated = src.decimated; last_fps = src.last_fps; return (*this); } void diff --git a/visualization/include/pcl/visualization/point_picking_event.h b/visualization/include/pcl/visualization/point_picking_event.h index 0d5980503e4..7dd191416e8 100644 --- a/visualization/include/pcl/visualization/point_picking_event.h +++ b/visualization/include/pcl/visualization/point_picking_event.h @@ -59,7 +59,7 @@ namespace pcl PointPickingCallback () : x_ (0), y_ (0), z_ (0), idx_ (-1), pick_first_ (false) {} /** \brief Empty destructor */ - ~PointPickingCallback () {} + ~PointPickingCallback () override = default; void Execute (vtkObject *caller, unsigned long eventid, void*) override; diff --git a/visualization/include/pcl/visualization/range_image_visualizer.h b/visualization/include/pcl/visualization/range_image_visualizer.h index 4a4ad1624f7..f550e7f1b98 100644 --- a/visualization/include/pcl/visualization/range_image_visualizer.h +++ b/visualization/include/pcl/visualization/range_image_visualizer.h @@ -56,7 +56,7 @@ namespace pcl //! Constructor RangeImageVisualizer (const std::string& name="Range Image"); //! Destructor - ~RangeImageVisualizer (); + ~RangeImageVisualizer () override; // =====PUBLIC STATIC METHODS===== /** Get a widget visualizing the given range image. diff --git a/visualization/src/cloud_viewer.cpp b/visualization/src/cloud_viewer.cpp index d670dbb7ec2..a8f0acde12b 100644 --- a/visualization/src/cloud_viewer.cpp +++ b/visualization/src/cloud_viewer.cpp @@ -151,8 +151,7 @@ struct pcl::visualization::CloudViewer::CloudViewer_impl } ~CloudViewer_impl () - { - } + = default; //////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/visualization/src/image_viewer.cpp b/visualization/src/image_viewer.cpp index 493e1a703d8..8e51598cd2e 100644 --- a/visualization/src/image_viewer.cpp +++ b/visualization/src/image_viewer.cpp @@ -899,8 +899,7 @@ pcl::visualization::ImageViewer::convertIntensityCloud8uToUChar ( ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// pcl::visualization::ImageViewerInteractorStyle::ImageViewerInteractorStyle () -{ -} += default; ////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/visualization/src/pcl_plotter.cpp b/visualization/src/pcl_plotter.cpp index e9c0fe959fb..fed41725ad0 100644 --- a/visualization/src/pcl_plotter.cpp +++ b/visualization/src/pcl_plotter.cpp @@ -87,7 +87,7 @@ pcl::visualization::PCLPlotter::PCLPlotter (char const *name) } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -pcl::visualization::PCLPlotter::~PCLPlotter() {} +pcl::visualization::PCLPlotter::~PCLPlotter() = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/visualization/src/range_image_visualizer.cpp b/visualization/src/range_image_visualizer.cpp index de7b3ab475a..749548236a6 100644 --- a/visualization/src/range_image_visualizer.cpp +++ b/visualization/src/range_image_visualizer.cpp @@ -41,8 +41,7 @@ pcl::visualization::RangeImageVisualizer::RangeImageVisualizer (const std::strin } pcl::visualization::RangeImageVisualizer::~RangeImageVisualizer () -{ -} += default; // void // pcl::visualization::RangeImageVisualizer::setRangeImage (const pcl::RangeImage& range_image, float min_value, float max_value, bool grayscale) From 5203f5d1d0aba5f8e6c841c55827995fe0c6b520 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Sat, 27 Feb 2021 19:06:01 -0800 Subject: [PATCH 03/16] Fixed formatting issues flagged by CI [PCL-2731] Signed-off-by: Norm Evangelista --- ml/include/pcl/ml/feature_handler.h | 2 +- ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp | 3 +-- ml/include/pcl/ml/impl/dt/decision_forest_trainer.hpp | 3 +-- ml/include/pcl/ml/impl/dt/decision_tree_evaluator.hpp | 6 ++---- ml/include/pcl/ml/impl/dt/decision_tree_trainer.hpp | 3 +-- ml/include/pcl/ml/pairwise_potential.h | 2 +- ml/include/pcl/ml/stats_estimator.h | 2 +- ml/src/svm.cpp | 4 ++-- .../include/pcl/registration/transformation_estimation.h | 4 ++-- .../include/pcl/registration/transformation_estimation_2D.h | 4 ++-- .../transformation_estimation_dual_quaternion.h | 4 ++-- .../include/pcl/registration/transformation_estimation_lm.h | 2 +- .../registration/transformation_estimation_point_to_plane.h | 4 ++-- .../transformation_estimation_point_to_plane_lls.h | 4 ++-- .../transformation_estimation_point_to_plane_lls_weighted.h | 4 ++-- .../transformation_estimation_point_to_plane_weighted.h | 2 +- .../pcl/registration/transformation_estimation_svd.h | 2 +- ...transformation_estimation_symmetric_point_to_plane_lls.h | 2 +- .../include/pcl/registration/transformation_validation.h | 4 ++-- .../pcl/registration/transformation_validation_euclidean.h | 2 +- registration/include/pcl/registration/warp_point_rigid.h | 2 +- stereo/include/pcl/stereo/impl/disparity_map_converter.hpp | 3 +-- stereo/include/pcl/stereo/stereo_matching.h | 4 ++-- 23 files changed, 33 insertions(+), 39 deletions(-) diff --git a/ml/include/pcl/ml/feature_handler.h b/ml/include/pcl/ml/feature_handler.h index 112af1a8579..5ccc3f9ccf2 100644 --- a/ml/include/pcl/ml/feature_handler.h +++ b/ml/include/pcl/ml/feature_handler.h @@ -49,7 +49,7 @@ template class PCL_EXPORTS FeatureHandler { public: /** Destructor. */ - virtual ~FeatureHandler()= default;; + virtual ~FeatureHandler() = default; /** Creates random features. * diff --git a/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp b/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp index 62c68dfecfe..69ef6a85788 100644 --- a/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp +++ b/ml/include/pcl/ml/impl/dt/decision_forest_evaluator.hpp @@ -61,8 +61,7 @@ template pcl::DecisionForestEvaluator:: - ~DecisionForestEvaluator() -= default; + ~DecisionForestEvaluator() = default; template DecisionForestTrainer:: - ~DecisionForestTrainer() -= default; + ~DecisionForestTrainer() = default; template DecisionTreeEvaluator:: - DecisionTreeEvaluator() -= default; + DecisionTreeEvaluator() = default; template DecisionTreeEvaluator:: - ~DecisionTreeEvaluator() -= default; + ~DecisionTreeEvaluator() = default; template DecisionTreeTrainer:: - ~DecisionTreeTrainer() -= default; + ~DecisionTreeTrainer() = default; template & out, diff --git a/ml/include/pcl/ml/stats_estimator.h b/ml/include/pcl/ml/stats_estimator.h index d9cee65edde..72424be49bc 100644 --- a/ml/include/pcl/ml/stats_estimator.h +++ b/ml/include/pcl/ml/stats_estimator.h @@ -50,7 +50,7 @@ class PCL_EXPORTS StatsEstimator { public: /** Destructor. */ - virtual ~StatsEstimator()= default;; + virtual ~StatsEstimator() = default; /** Returns the number of brances a node can have (e.g. a binary tree has 2). */ virtual std::size_t diff --git a/ml/src/svm.cpp b/ml/src/svm.cpp index 9ccc508ebfb..379ee3458ba 100644 --- a/ml/src/svm.cpp +++ b/ml/src/svm.cpp @@ -520,9 +520,9 @@ Kernel::k_function(const svm_node* x, const svm_node* y, const svm_parameter& pa class Solver { public: - Solver()= default;; + Solver() = default; - virtual ~Solver()= default;; + virtual ~Solver() = default; struct SolutionInfo { double obj; diff --git a/registration/include/pcl/registration/transformation_estimation.h b/registration/include/pcl/registration/transformation_estimation.h index 18ac1a979fa..7d00ef38f90 100644 --- a/registration/include/pcl/registration/transformation_estimation.h +++ b/registration/include/pcl/registration/transformation_estimation.h @@ -63,8 +63,8 @@ class TransformationEstimation { public: using Matrix4 = Eigen::Matrix; - TransformationEstimation()= default;; - virtual ~TransformationEstimation()= default;; + TransformationEstimation() = default; + virtual ~TransformationEstimation() = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud. \param[in] cloud_src the source point cloud dataset \param[in] diff --git a/registration/include/pcl/registration/transformation_estimation_2D.h b/registration/include/pcl/registration/transformation_estimation_2D.h index b4bc662710c..e079a5b10d2 100644 --- a/registration/include/pcl/registration/transformation_estimation_2D.h +++ b/registration/include/pcl/registration/transformation_estimation_2D.h @@ -65,8 +65,8 @@ class TransformationEstimation2D using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimation2D()= default;; - virtual ~TransformationEstimation2D()= default;; + TransformationEstimation2D() = default; + virtual ~TransformationEstimation2D() = default; /** \brief Estimate a rigid transformation between a source and a target point cloud * in 2D. \param[in] cloud_src the source point cloud dataset \param[in] cloud_tgt the diff --git a/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h b/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h index c5315147331..90412876ed6 100644 --- a/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h +++ b/registration/include/pcl/registration/transformation_estimation_dual_quaternion.h @@ -64,8 +64,8 @@ class TransformationEstimationDualQuaternion using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimationDualQuaternion()= default;; - ~TransformationEstimationDualQuaternion()= default;; + TransformationEstimationDualQuaternion() = default; + ~TransformationEstimationDualQuaternion() = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using dual quaternion optimization \param[in] cloud_src the source diff --git a/registration/include/pcl/registration/transformation_estimation_lm.h b/registration/include/pcl/registration/transformation_estimation_lm.h index ebf1b2a0310..94705070796 100644 --- a/registration/include/pcl/registration/transformation_estimation_lm.h +++ b/registration/include/pcl/registration/transformation_estimation_lm.h @@ -104,7 +104,7 @@ class TransformationEstimationLM } /** \brief Destructor. */ - ~TransformationEstimationLM() override= default;; + ~TransformationEstimationLM() override = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using LM. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane.h index 83a02a87476..bb9df22e7d4 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane.h @@ -71,8 +71,8 @@ class TransformationEstimationPointToPlane using Vector4 = Eigen::Matrix; - TransformationEstimationPointToPlane()= default;; - ~TransformationEstimationPointToPlane()= default;; + TransformationEstimationPointToPlane() = default; + ~TransformationEstimationPointToPlane() = default; protected: Scalar diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h index db72b7de767..3e79c9f5812 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls.h @@ -71,8 +71,8 @@ class TransformationEstimationPointToPlaneLLS using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimationPointToPlaneLLS()= default;; - ~TransformationEstimationPointToPlaneLLS() override= default;; + TransformationEstimationPointToPlaneLLS() = default; + ~TransformationEstimationPointToPlaneLLS() override = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h index ebbb34a96c6..cf9f581e559 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane_lls_weighted.h @@ -74,8 +74,8 @@ class TransformationEstimationPointToPlaneLLSWeighted using Matrix4 = typename TransformationEstimation::Matrix4; - TransformationEstimationPointToPlaneLLSWeighted()= default;; - virtual ~TransformationEstimationPointToPlaneLLSWeighted()= default;; + TransformationEstimationPointToPlaneLLSWeighted() = default; + virtual ~TransformationEstimationPointToPlaneLLSWeighted() = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h b/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h index f40e27aa82f..063e2ebcddd 100644 --- a/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h +++ b/registration/include/pcl/registration/transformation_estimation_point_to_plane_weighted.h @@ -115,7 +115,7 @@ class TransformationEstimationPointToPlaneWeighted } /** \brief Destructor. */ - virtual ~TransformationEstimationPointToPlaneWeighted()= default;; + virtual ~TransformationEstimationPointToPlaneWeighted() = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using LM. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_svd.h b/registration/include/pcl/registration/transformation_estimation_svd.h index d67c755cd4c..c0545e374c5 100644 --- a/registration/include/pcl/registration/transformation_estimation_svd.h +++ b/registration/include/pcl/registration/transformation_estimation_svd.h @@ -68,7 +68,7 @@ class TransformationEstimationSVD * \param[in] use_umeyama Toggles whether or not to use 3rd party software*/ TransformationEstimationSVD(bool use_umeyama = true) : use_umeyama_(use_umeyama) {} - ~TransformationEstimationSVD() override= default;; + ~TransformationEstimationSVD() override = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h b/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h index 523363d88ae..89236b83be8 100644 --- a/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h +++ b/registration/include/pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h @@ -73,7 +73,7 @@ class TransformationEstimationSymmetricPointToPlaneLLS TransformationEstimationSymmetricPointToPlaneLLS() : enforce_same_direction_normals_(true){}; - ~TransformationEstimationSymmetricPointToPlaneLLS()= default;; + ~TransformationEstimationSymmetricPointToPlaneLLS() = default; /** \brief Estimate a rigid rotation transformation between a source and a target * point cloud using SVD. \param[in] cloud_src the source point cloud dataset diff --git a/registration/include/pcl/registration/transformation_validation.h b/registration/include/pcl/registration/transformation_validation.h index 7fd9f09bbde..fd34482a60e 100644 --- a/registration/include/pcl/registration/transformation_validation.h +++ b/registration/include/pcl/registration/transformation_validation.h @@ -80,8 +80,8 @@ class TransformationValidation { using PointCloudTargetPtr = typename PointCloudTarget::Ptr; using PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr; - TransformationValidation()= default;; - virtual ~TransformationValidation()= default;; + TransformationValidation() = default; + virtual ~TransformationValidation() = default; /** \brief Validate the given transformation with respect to the input cloud data, and * return a score. Pure virtual. diff --git a/registration/include/pcl/registration/transformation_validation_euclidean.h b/registration/include/pcl/registration/transformation_validation_euclidean.h index 8c9b19451e7..b22ed68adaf 100644 --- a/registration/include/pcl/registration/transformation_validation_euclidean.h +++ b/registration/include/pcl/registration/transformation_validation_euclidean.h @@ -104,7 +104,7 @@ class TransformationValidationEuclidean { , force_no_recompute_(false) {} - virtual ~TransformationValidationEuclidean()= default;; + virtual ~TransformationValidationEuclidean() = default; /** \brief Set the maximum allowable distance between a point and its correspondence * in the target in order for a correspondence to be considered \a valid. Default: diff --git a/registration/include/pcl/registration/warp_point_rigid.h b/registration/include/pcl/registration/warp_point_rigid.h index a48939e822a..2aa6dec1603 100644 --- a/registration/include/pcl/registration/warp_point_rigid.h +++ b/registration/include/pcl/registration/warp_point_rigid.h @@ -71,7 +71,7 @@ class WarpPointRigid { }; /** \brief Destructor. */ - virtual ~WarpPointRigid()= default;; + virtual ~WarpPointRigid() = default; /** \brief Set warp parameters. Pure virtual. * \param[in] p warp parameters diff --git a/stereo/include/pcl/stereo/impl/disparity_map_converter.hpp b/stereo/include/pcl/stereo/impl/disparity_map_converter.hpp index d84346e4d02..773a2870411 100644 --- a/stereo/include/pcl/stereo/impl/disparity_map_converter.hpp +++ b/stereo/include/pcl/stereo/impl/disparity_map_converter.hpp @@ -59,8 +59,7 @@ pcl::DisparityMapConverter::DisparityMapConverter() {} template -pcl::DisparityMapConverter::~DisparityMapConverter() -= default; +pcl::DisparityMapConverter::~DisparityMapConverter() = default; template inline void diff --git a/stereo/include/pcl/stereo/stereo_matching.h b/stereo/include/pcl/stereo/stereo_matching.h index cb007ce89f8..7dd966adc18 100644 --- a/stereo/include/pcl/stereo/stereo_matching.h +++ b/stereo/include/pcl/stereo/stereo_matching.h @@ -428,7 +428,7 @@ class PCL_EXPORTS GrayStereoMatching : public StereoMatching { class PCL_EXPORTS BlockBasedStereoMatching : public GrayStereoMatching { public: BlockBasedStereoMatching(); - ~BlockBasedStereoMatching() override= default;; + ~BlockBasedStereoMatching() override = default; /** \brief setter for the radius of the squared window * \param[in] radius radius of the squared window used to compute the block-based @@ -465,7 +465,7 @@ class PCL_EXPORTS AdaptiveCostSOStereoMatching : public GrayStereoMatching { public: AdaptiveCostSOStereoMatching(); - ~AdaptiveCostSOStereoMatching() override= default;; + ~AdaptiveCostSOStereoMatching() override = default; /** \brief setter for the radius (half length) of the column used for cost aggregation * \param[in] radius radius (half length) of the column used for cost aggregation; the From 060d963bf4790ccdc7cde3c370ef4e1785e432d6 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Sat, 27 Feb 2021 22:23:04 -0800 Subject: [PATCH 04/16] Filled out WarningsAsErrors section in .clang-tidy [PCL-2731] Signed-off-by: Norm Evangelista --- .clang-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 3176eba81d5..0d18a137593 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,3 @@ --- Checks: '-*,modernize-deprecated-headers,modernize-redundant-void-arg,modernize-replace-random-shuffle,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,modernize-use-override,modernize-use-using' -WarningsAsErrors: '#same content as in checks, but for errors' +WarningsAsErrors: '-*,modernize-deprecated-headers,modernize-redundant-void-arg,modernize-replace-random-shuffle,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,modernize-use-override,modernize-use-using' From 6a35efaf2bf08e44f59b8623eedbfcccb2a1235a Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Sat, 6 Mar 2021 17:42:24 -0800 Subject: [PATCH 05/16] Fixed formatting issue flagged by CI [PCL-2731] Signed-off-by: Norm Evangelista --- geometry/include/pcl/geometry/planar_polygon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry/include/pcl/geometry/planar_polygon.h b/geometry/include/pcl/geometry/planar_polygon.h index c5813567519..fe3e9eb2ca5 100644 --- a/geometry/include/pcl/geometry/planar_polygon.h +++ b/geometry/include/pcl/geometry/planar_polygon.h @@ -67,7 +67,7 @@ class PlanarPolygon { {} /** \brief Destructor. */ - virtual ~PlanarPolygon () = default; + virtual ~PlanarPolygon() = default; /** \brief Set the internal contour * \param[in] contour the new planar polygonal contour From 6477cf73a9b56288e2179c025a54914980bb10f4 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Wed, 10 Mar 2021 15:46:42 -0800 Subject: [PATCH 06/16] Placed '= default' on one line per review [PCL-2731] Signed-off-by: Norm Evangelista --- apps/cloud_composer/src/project_model.cpp | 4 ++-- common/include/pcl/ModelCoefficients.h | 3 +-- common/include/pcl/PointIndices.h | 3 +-- common/include/pcl/PolygonMesh.h | 3 +-- common/include/pcl/Vertices.h | 3 +-- common/include/pcl/impl/cloud_iterator.hpp | 6 ++---- common/src/feature_histogram.cpp | 3 +-- common/src/range_image_planar.cpp | 3 +-- features/include/pcl/features/impl/esf.hpp | 2 +- .../features/impl/linear_least_squares_normal.hpp | 3 +-- features/include/pcl/features/impl/vfh.hpp | 2 +- .../include/pcl/features/organized_edge_detection.h | 12 ++++-------- ...atistical_multiscale_interest_region_extraction.h | 3 +-- features/src/narf.cpp | 3 +-- gpu/kinfu/src/cuda/marching_cubes.cu | 2 +- gpu/kinfu/src/cuda/ray_caster.cu | 2 +- io/include/pcl/io/openni_camera/openni_ir_image.h | 3 +-- .../openni_camera/openni_shift_to_depth_conversion.h | 2 +- io/include/pcl/io/ply_io.h | 4 ++-- io/src/ascii_io.cpp | 3 +-- io/src/io_exception.cpp | 3 +-- io/src/openni_camera/openni_driver.cpp | 4 +--- io/src/openni_camera/openni_exception.cpp | 3 +-- io/src/openni_camera/openni_image_bayer_grbg.cpp | 3 +-- io/src/openni_camera/openni_image_rgb24.cpp | 3 +-- io/src/openni_camera/openni_image_yuv_422.cpp | 3 +-- io/src/vlp_grabber.cpp | 3 +-- kdtree/include/pcl/kdtree/kdtree.h | 2 +- keypoints/include/pcl/keypoints/impl/iss_3d.hpp | 2 +- keypoints/src/brisk_2d.cpp | 3 +-- outofcore/src/visualization/scene.cpp | 3 +-- .../recognition/3rdparty/metslib/abstract-search.hh | 3 +-- .../pcl/recognition/3rdparty/metslib/model.hh | 8 ++++---- .../pcl/recognition/color_gradient_modality.h | 3 +-- .../pcl/recognition/surface_normal_modality.h | 3 +-- recognition/src/dotmod.cpp | 3 +-- recognition/src/linemod.cpp | 3 +-- recognition/src/quantizable_modality.cpp | 9 +++------ .../approximate_progressive_morphological_filter.hpp | 3 +-- .../pcl/segmentation/impl/cpc_segmentation.hpp | 3 +-- .../segmentation/impl/crf_normal_segmentation.hpp | 6 ++---- .../pcl/segmentation/impl/crf_segmentation.hpp | 3 +-- .../pcl/segmentation/impl/lccp_segmentation.hpp | 3 +-- .../impl/progressive_morphological_filter.hpp | 3 +-- .../pcl/segmentation/impl/supervoxel_clustering.hpp | 3 +-- .../pcl/segmentation/impl/unary_classifier.hpp | 3 +-- surface/include/pcl/surface/impl/marching_cubes.hpp | 3 +-- .../pcl/surface/impl/marching_cubes_hoppe.hpp | 3 +-- .../include/pcl/surface/impl/marching_cubes_rbf.hpp | 3 +-- surface/include/pcl/surface/impl/poisson.hpp | 3 +-- .../src/3rdparty/opennurbs/opennurbs_material.cpp | 2 +- test/features/test_ii_normals.cpp | 6 +++--- visualization/src/image_viewer.cpp | 3 +-- visualization/src/range_image_visualizer.cpp | 3 +-- 54 files changed, 68 insertions(+), 118 deletions(-) diff --git a/apps/cloud_composer/src/project_model.cpp b/apps/cloud_composer/src/project_model.cpp index 5be855c478b..19f3c30b840 100644 --- a/apps/cloud_composer/src/project_model.cpp +++ b/apps/cloud_composer/src/project_model.cpp @@ -444,7 +444,7 @@ pcl::cloud_composer::ProjectModel::clearSelection () foreach (CloudItem* selected_item, selected_item_index_map_.keys()) { qDebug () << "Setting item color back to black"; - selected_item->setForeground (QBrush (Qt::black));; + selected_item->setForeground (QBrush (Qt::black)); } selected_item_index_map_.clear (); @@ -583,7 +583,7 @@ pcl::cloud_composer::ProjectModel::itemSelectionChanged ( const QItemSelection & //Set all point selected cloud items back to green text, since if they are selected they get changed to white foreach (CloudItem* selected_item, selected_item_index_map_.keys()) { - selected_item->setForeground (QBrush (Qt::green));; + selected_item->setForeground (QBrush (Qt::green)); } } diff --git a/common/include/pcl/ModelCoefficients.h b/common/include/pcl/ModelCoefficients.h index 62c51f8b0e4..3d1a5d0ecb2 100644 --- a/common/include/pcl/ModelCoefficients.h +++ b/common/include/pcl/ModelCoefficients.h @@ -10,8 +10,7 @@ namespace pcl { struct ModelCoefficients { - ModelCoefficients () - = default; + ModelCoefficients () = default; ::pcl::PCLHeader header; diff --git a/common/include/pcl/PointIndices.h b/common/include/pcl/PointIndices.h index b3fdddced5f..77096c341fc 100644 --- a/common/include/pcl/PointIndices.h +++ b/common/include/pcl/PointIndices.h @@ -13,8 +13,7 @@ namespace pcl using Ptr = shared_ptr< ::pcl::PointIndices>; using ConstPtr = shared_ptr; - PointIndices () - = default; + PointIndices () = default; ::pcl::PCLHeader header; diff --git a/common/include/pcl/PolygonMesh.h b/common/include/pcl/PolygonMesh.h index d28d923cc88..89aefabd37a 100644 --- a/common/include/pcl/PolygonMesh.h +++ b/common/include/pcl/PolygonMesh.h @@ -13,8 +13,7 @@ namespace pcl { struct PolygonMesh { - PolygonMesh () - = default; + PolygonMesh () = default; ::pcl::PCLHeader header; diff --git a/common/include/pcl/Vertices.h b/common/include/pcl/Vertices.h index a2a03c7980f..388b24e260a 100644 --- a/common/include/pcl/Vertices.h +++ b/common/include/pcl/Vertices.h @@ -13,8 +13,7 @@ namespace pcl */ struct Vertices { - Vertices () - = default; + Vertices () = default; Indices vertices; diff --git a/common/include/pcl/impl/cloud_iterator.hpp b/common/include/pcl/impl/cloud_iterator.hpp index 83cfe7ad633..c7671b822b3 100644 --- a/common/include/pcl/impl/cloud_iterator.hpp +++ b/common/include/pcl/impl/cloud_iterator.hpp @@ -56,8 +56,7 @@ namespace pcl { } - ~DefaultIterator () - = default; + ~DefaultIterator () = default; void operator ++ () { @@ -195,8 +194,7 @@ namespace pcl { } - ~DefaultConstIterator () override - = default; + ~DefaultConstIterator () override = default; void operator ++ () override { diff --git a/common/src/feature_histogram.cpp b/common/src/feature_histogram.cpp index ccdae01a488..d436ed54378 100644 --- a/common/src/feature_histogram.cpp +++ b/common/src/feature_histogram.cpp @@ -64,8 +64,7 @@ pcl::FeatureHistogram::FeatureHistogram (std::size_t const number_of_bins, number_of_bins_ = number_of_bins; } -pcl::FeatureHistogram::~FeatureHistogram () -= default; +pcl::FeatureHistogram::~FeatureHistogram () = default; float pcl::FeatureHistogram::getThresholdMin () const diff --git a/common/src/range_image_planar.cpp b/common/src/range_image_planar.cpp index 62630978d05..e79ed13d402 100644 --- a/common/src/range_image_planar.cpp +++ b/common/src/range_image_planar.cpp @@ -50,8 +50,7 @@ namespace pcl } ///////////////////////////////////////////////////////////////////////// - RangeImagePlanar::~RangeImagePlanar () - = default; + RangeImagePlanar::~RangeImagePlanar () = default; ///////////////////////////////////////////////////////////////////////// void diff --git a/features/include/pcl/features/impl/esf.hpp b/features/include/pcl/features/impl/esf.hpp index b83d0d6bda6..9f17be2ffad 100644 --- a/features/include/pcl/features/impl/esf.hpp +++ b/features/include/pcl/features/impl/esf.hpp @@ -342,7 +342,7 @@ pcl::ESFEstimation::lci ( int err_2 = dz2 - l; for (int i = 1; i(lut_[act_voxel[0]][act_voxel[1]][act_voxel[2]] == 1); if (err_1 > 0) { diff --git a/features/include/pcl/features/impl/linear_least_squares_normal.hpp b/features/include/pcl/features/impl/linear_least_squares_normal.hpp index dab95f526c2..cc2530e51a8 100644 --- a/features/include/pcl/features/impl/linear_least_squares_normal.hpp +++ b/features/include/pcl/features/impl/linear_least_squares_normal.hpp @@ -44,8 +44,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::LinearLeastSquaresNormalEstimation::~LinearLeastSquaresNormalEstimation () -= default; +pcl::LinearLeastSquaresNormalEstimation::~LinearLeastSquaresNormalEstimation () = default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/features/include/pcl/features/impl/vfh.hpp b/features/include/pcl/features/impl/vfh.hpp index af706a33b2b..886d1626a87 100644 --- a/features/include/pcl/features/impl/vfh.hpp +++ b/features/include/pcl/features/impl/vfh.hpp @@ -125,7 +125,7 @@ pcl::VFHEstimation::computePointSPFHSignature (con if (normalize_bins_) hist_incr = 100.0f / static_cast (indices.size () - 1); - float hist_incr_size_component = 0;; + float hist_incr_size_component = 0; if (size_component_) hist_incr_size_component = hist_incr; diff --git a/features/include/pcl/features/organized_edge_detection.h b/features/include/pcl/features/organized_edge_detection.h index 33d0ea02ac2..ed5230f4ad3 100644 --- a/features/include/pcl/features/organized_edge_detection.h +++ b/features/include/pcl/features/organized_edge_detection.h @@ -82,8 +82,7 @@ namespace pcl /** \brief Destructor for OrganizedEdgeBase */ - ~OrganizedEdgeBase () override - = default; + ~OrganizedEdgeBase () override = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities) * \param[out] labels a PointCloud of edge labels @@ -211,8 +210,7 @@ namespace pcl /** \brief Destructor for OrganizedEdgeFromRGB */ - ~OrganizedEdgeFromRGB () override - = default; + ~OrganizedEdgeFromRGB () override = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities and RGB Canny edge) and assign point indices for each edge label * \param[out] labels a PointCloud of edge labels @@ -301,8 +299,7 @@ namespace pcl /** \brief Destructor for OrganizedEdgeFromNormals */ - ~OrganizedEdgeFromNormals () override - = default; + ~OrganizedEdgeFromNormals () override = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities and high curvature regions) and assign point indices for each edge label * \param[out] labels a PointCloud of edge labels @@ -409,8 +406,7 @@ namespace pcl /** \brief Destructor for OrganizedEdgeFromRGBNormals */ - ~OrganizedEdgeFromRGBNormals () override - = default; + ~OrganizedEdgeFromRGBNormals () override = default; /** \brief Perform the 3D edge detection (edges from depth discontinuities, RGB Canny edge, and high curvature regions) and assign point indices for each edge label * \param[out] labels a PointCloud of edge labels diff --git a/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h b/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h index a80dc7c7e9a..65206c2bddd 100644 --- a/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h +++ b/features/include/pcl/features/statistical_multiscale_interest_region_extraction.h @@ -70,8 +70,7 @@ namespace pcl /** \brief Empty constructor */ - StatisticalMultiscaleInterestRegionExtraction () - = default;; + StatisticalMultiscaleInterestRegionExtraction () = default; /** \brief Method that generates the underlying nearest neighbor graph based on the * input point cloud diff --git a/features/src/narf.cpp b/features/src/narf.cpp index d8373ae7316..3ca00f6aca8 100644 --- a/features/src/narf.cpp +++ b/features/src/narf.cpp @@ -608,8 +608,7 @@ NarfDescriptor::NarfDescriptor (const RangeImage* range_image, const pcl::Indice } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// -NarfDescriptor::~NarfDescriptor () -= default; +NarfDescriptor::~NarfDescriptor () = default; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/gpu/kinfu/src/cuda/marching_cubes.cu b/gpu/kinfu/src/cuda/marching_cubes.cu index fa201177436..ca4d10225d9 100644 --- a/gpu/kinfu/src/cuda/marching_cubes.cu +++ b/gpu/kinfu/src/cuda/marching_cubes.cu @@ -155,7 +155,7 @@ namespace pcl for (int z = 0; z < VOLUME_Z - 1; z++) { - int numVerts = 0;; + int numVerts = 0; if (x + 1 < VOLUME_X && y + 1 < VOLUME_Y) { float field[8]; diff --git a/gpu/kinfu/src/cuda/ray_caster.cu b/gpu/kinfu/src/cuda/ray_caster.cu index bd2494f5345..2e06bc8a114 100644 --- a/gpu/kinfu/src/cuda/ray_caster.cu +++ b/gpu/kinfu/src/cuda/ray_caster.cu @@ -273,7 +273,7 @@ namespace pcl break; } - } /* for(;;) */ + } /* for(;) */ } }; diff --git a/io/include/pcl/io/openni_camera/openni_ir_image.h b/io/include/pcl/io/openni_camera/openni_ir_image.h index 30f02b44d69..7320ef61339 100644 --- a/io/include/pcl/io/openni_camera/openni_ir_image.h +++ b/io/include/pcl/io/openni_camera/openni_ir_image.h @@ -74,8 +74,7 @@ IRImage::IRImage (pcl::shared_ptr ir_meta_data) noexcept { } -IRImage::~IRImage () noexcept -= default; +IRImage::~IRImage () noexcept = default; unsigned IRImage::getWidth () const throw () { diff --git a/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h b/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h index 940b548ad26..af911a947e7 100644 --- a/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h +++ b/io/include/pcl/io/openni_camera/openni_shift_to_depth_conversion.h @@ -56,7 +56,7 @@ namespace openni_wrapper ShiftToDepthConverter () : init_(false) {} /** \brief Destructor. */ - virtual ~ShiftToDepthConverter () = default;; + virtual ~ShiftToDepthConverter () = default; /** \brief This method generates a look-up table to convert openni shift values to depth */ diff --git a/io/include/pcl/io/ply_io.h b/io/include/pcl/io/ply_io.h index efbf92fce0f..3f17500c3ff 100644 --- a/io/include/pcl/io/ply_io.h +++ b/io/include/pcl/io/ply_io.h @@ -547,10 +547,10 @@ namespace pcl { public: ///Constructor - PLYWriter () = default;; + PLYWriter () = default; ///Destructor - ~PLYWriter () override = default;; + ~PLYWriter () override = default; /** \brief Generate the header of a PLY v.7 file format * \param[in] cloud the point cloud data message diff --git a/io/src/ascii_io.cpp b/io/src/ascii_io.cpp index 2a5380f65b0..ba0d248c34f 100644 --- a/io/src/ascii_io.cpp +++ b/io/src/ascii_io.cpp @@ -78,8 +78,7 @@ pcl::ASCIIReader::ASCIIReader () } ////////////////////////////////////////////////////////////////////////////// -pcl::ASCIIReader::~ASCIIReader () -= default; +pcl::ASCIIReader::~ASCIIReader () = default; ////////////////////////////////////////////////////////////////////////////// int diff --git a/io/src/io_exception.cpp b/io/src/io_exception.cpp index 5e615ec8239..b0fdaa61abb 100644 --- a/io/src/io_exception.cpp +++ b/io/src/io_exception.cpp @@ -47,8 +47,7 @@ pcl::io::IOException::IOException (const std::string& function_name, const std:: message_long_ = sstream.str (); } -pcl::io::IOException::~IOException () noexcept -= default; +pcl::io::IOException::~IOException () noexcept = default; pcl::io::IOException& pcl::io::IOException::operator = (const IOException& exception) diff --git a/io/src/openni_camera/openni_driver.cpp b/io/src/openni_camera/openni_driver.cpp index a45811a061e..c0ab17f9bb6 100644 --- a/io/src/openni_camera/openni_driver.cpp +++ b/io/src/openni_camera/openni_driver.cpp @@ -556,8 +556,6 @@ openni_wrapper::OpenNIDriver::DeviceContext::DeviceContext (const xn::NodeInfo& } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -openni_wrapper::OpenNIDriver::DeviceContext::DeviceContext (const DeviceContext& other) - -= default; +openni_wrapper::OpenNIDriver::DeviceContext::DeviceContext (const DeviceContext& other) = default; #endif diff --git a/io/src/openni_camera/openni_exception.cpp b/io/src/openni_camera/openni_exception.cpp index 4b164bea20e..bfc39583fd1 100644 --- a/io/src/openni_camera/openni_exception.cpp +++ b/io/src/openni_camera/openni_exception.cpp @@ -54,8 +54,7 @@ OpenNIException::OpenNIException (const std::string& function_name, const std::s message_long_ = sstream.str(); } -OpenNIException::~OpenNIException () noexcept -= default; +OpenNIException::~OpenNIException () noexcept = default; OpenNIException& OpenNIException::operator = (const OpenNIException& exception) noexcept { diff --git a/io/src/openni_camera/openni_image_bayer_grbg.cpp b/io/src/openni_camera/openni_image_bayer_grbg.cpp index eb2de73f910..c1fd2c7d38f 100644 --- a/io/src/openni_camera/openni_image_bayer_grbg.cpp +++ b/io/src/openni_camera/openni_image_bayer_grbg.cpp @@ -55,8 +55,7 @@ openni_wrapper::ImageBayerGRBG::ImageBayerGRBG (pcl::shared_ptr image_meta_data) noex { } -ImageRGB24::~ImageRGB24 () noexcept -= default; +ImageRGB24::~ImageRGB24 () noexcept = default; void ImageRGB24::fillGrayscale (unsigned width, unsigned height, unsigned char* gray_buffer, unsigned gray_line_step) const { diff --git a/io/src/openni_camera/openni_image_yuv_422.cpp b/io/src/openni_camera/openni_image_yuv_422.cpp index e74d8c30e1f..ba3dea1478f 100644 --- a/io/src/openni_camera/openni_image_yuv_422.cpp +++ b/io/src/openni_camera/openni_image_yuv_422.cpp @@ -52,8 +52,7 @@ ImageYUV422::ImageYUV422 (pcl::shared_ptr image_meta_data) no { } -ImageYUV422::~ImageYUV422 () noexcept -= default; +ImageYUV422::~ImageYUV422 () noexcept = default; bool ImageYUV422::isResizingSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const { diff --git a/io/src/vlp_grabber.cpp b/io/src/vlp_grabber.cpp index adcb8b20519..b3163eac1d6 100644 --- a/io/src/vlp_grabber.cpp +++ b/io/src/vlp_grabber.cpp @@ -58,8 +58,7 @@ pcl::VLPGrabber::VLPGrabber (const boost::asio::ip::address& ipAddress, } ///////////////////////////////////////////////////////////////////////////// -pcl::VLPGrabber::~VLPGrabber () noexcept -= default; +pcl::VLPGrabber::~VLPGrabber () noexcept = default; ///////////////////////////////////////////////////////////////////////////// void diff --git a/kdtree/include/pcl/kdtree/kdtree.h b/kdtree/include/pcl/kdtree/kdtree.h index 25537e0e36b..9717a2241cf 100644 --- a/kdtree/include/pcl/kdtree/kdtree.h +++ b/kdtree/include/pcl/kdtree/kdtree.h @@ -121,7 +121,7 @@ namespace pcl } /** \brief Destructor for KdTree. Deletes all allocated data arrays and destroys the kd-tree structures. */ - virtual ~KdTree () = default;; + virtual ~KdTree () = default; /** \brief Search for k-nearest neighbors for the given query point. * \param[in] p_q the given query point diff --git a/keypoints/include/pcl/keypoints/impl/iss_3d.hpp b/keypoints/include/pcl/keypoints/impl/iss_3d.hpp index 550c6e30b3c..0ebd531e315 100644 --- a/keypoints/include/pcl/keypoints/impl/iss_3d.hpp +++ b/keypoints/include/pcl/keypoints/impl/iss_3d.hpp @@ -380,7 +380,7 @@ pcl::ISSKeypoint3D::detectKeypoints (PointCloudOut } omp_mem[tid][0] = e2c / e1c; - omp_mem[tid][1] = e3c / e2c;; + omp_mem[tid][1] = e3c / e2c; omp_mem[tid][2] = e3c; } diff --git a/keypoints/src/brisk_2d.cpp b/keypoints/src/brisk_2d.cpp index e40905022f2..1727e2d3452 100644 --- a/keypoints/src/brisk_2d.cpp +++ b/keypoints/src/brisk_2d.cpp @@ -64,8 +64,7 @@ pcl::keypoints::brisk::ScaleSpace::ScaleSpace (int octaves) } ///////////////////////////////////////////////////////////////////////////////////////// -pcl::keypoints::brisk::ScaleSpace::~ScaleSpace () -= default; +pcl::keypoints::brisk::ScaleSpace::~ScaleSpace () = default; ///////////////////////////////////////////////////////////////////////////////////////// // construct the image pyramids diff --git a/outofcore/src/visualization/scene.cpp b/outofcore/src/visualization/scene.cpp index de090b3c9ef..6b8d33759e8 100644 --- a/outofcore/src/visualization/scene.cpp +++ b/outofcore/src/visualization/scene.cpp @@ -6,8 +6,7 @@ Scene* Scene::instance_ = nullptr; -Scene::Scene () -= default; +Scene::Scene () = default; // Accessors - Cameras // ----------------------------------------------------------------------------- diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh b/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh index 7550fd697a8..93f979cda01 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh @@ -335,8 +335,7 @@ namespace mets { } -inline mets::solution_recorder::~solution_recorder() -= default; +inline mets::solution_recorder::~solution_recorder() = default; inline bool mets::best_ever_solution::accept(const mets::feasible_solution& sol) diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/model.hh b/recognition/include/pcl/recognition/3rdparty/metslib/model.hh index ed8550f3231..327787fd675 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/model.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/model.hh @@ -79,7 +79,7 @@ namespace mets { class clonable { public: virtual - ~clonable() = default;; + ~clonable() = default; virtual clonable* clone() const = 0; }; @@ -88,7 +88,7 @@ namespace mets { class hashable { public: virtual - ~hashable() = default;; + ~hashable() = default; virtual std::size_t hash() const = 0; }; @@ -97,7 +97,7 @@ namespace mets { class copyable { public: virtual - ~copyable() = default;; + ~copyable() = default; virtual void copy_from(const copyable&) = 0; }; @@ -312,7 +312,7 @@ namespace mets { virtual ~move() - = default;; + = default; /// /// @brief Evaluate the cost after the move. diff --git a/recognition/include/pcl/recognition/color_gradient_modality.h b/recognition/include/pcl/recognition/color_gradient_modality.h index 6f286ca53f5..a72a09c2d2b 100644 --- a/recognition/include/pcl/recognition/color_gradient_modality.h +++ b/recognition/include/pcl/recognition/color_gradient_modality.h @@ -286,8 +286,7 @@ ColorGradientModality () ////////////////////////////////////////////////////////////////////////////////////////////// template pcl::ColorGradientModality:: -~ColorGradientModality () -= default; +~ColorGradientModality () = default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/recognition/include/pcl/recognition/surface_normal_modality.h b/recognition/include/pcl/recognition/surface_normal_modality.h index b140729443c..d613d838461 100644 --- a/recognition/include/pcl/recognition/surface_normal_modality.h +++ b/recognition/include/pcl/recognition/surface_normal_modality.h @@ -504,8 +504,7 @@ SurfaceNormalModality () ////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::SurfaceNormalModality::~SurfaceNormalModality () -= default; +pcl::SurfaceNormalModality::~SurfaceNormalModality () = default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/recognition/src/dotmod.cpp b/recognition/src/dotmod.cpp index eaf08b793b8..e11241537a6 100644 --- a/recognition/src/dotmod.cpp +++ b/recognition/src/dotmod.cpp @@ -51,8 +51,7 @@ DOTMOD(std::size_t template_width, ////////////////////////////////////////////////////////////////////////////////////////////// pcl::DOTMOD:: -~DOTMOD() -= default; +~DOTMOD() = default; ////////////////////////////////////////////////////////////////////////////////////////////// size_t diff --git a/recognition/src/linemod.cpp b/recognition/src/linemod.cpp index 4a96d8a66fe..2a04bb3edd8 100644 --- a/recognition/src/linemod.cpp +++ b/recognition/src/linemod.cpp @@ -56,8 +56,7 @@ pcl::LINEMOD::LINEMOD () } ////////////////////////////////////////////////////////////////////////////////////////////// -pcl::LINEMOD::~LINEMOD() -= default; +pcl::LINEMOD::~LINEMOD() = default; ////////////////////////////////////////////////////////////////////////////////////////////// int diff --git a/recognition/src/quantizable_modality.cpp b/recognition/src/quantizable_modality.cpp index b8dea084e53..3766688614b 100644 --- a/recognition/src/quantizable_modality.cpp +++ b/recognition/src/quantizable_modality.cpp @@ -39,12 +39,10 @@ #include ////////////////////////////////////////////////////////////////////////////////////////////// -pcl::QuantizableModality::QuantizableModality () -= default; +pcl::QuantizableModality::QuantizableModality () = default; ////////////////////////////////////////////////////////////////////////////////////////////// -pcl::QuantizableModality::~QuantizableModality () -= default; +pcl::QuantizableModality::~QuantizableModality () = default; ////////////////////////////////////////////////////////////////////////////////////////////// pcl::QuantizedMap::QuantizedMap () @@ -66,8 +64,7 @@ pcl::QuantizedMap::QuantizedMap (const std::size_t width, const std::size_t heig } ////////////////////////////////////////////////////////////////////////////////////////////// -pcl::QuantizedMap::~QuantizedMap () -= default; +pcl::QuantizedMap::~QuantizedMap () = default; ////////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp b/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp index e78228c1ced..9138c46f530 100644 --- a/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp +++ b/segmentation/include/pcl/segmentation/impl/approximate_progressive_morphological_filter.hpp @@ -63,8 +63,7 @@ pcl::ApproximateProgressiveMorphologicalFilter::ApproximateProgressiveMo ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::ApproximateProgressiveMorphologicalFilter::~ApproximateProgressiveMorphologicalFilter () -= default; +pcl::ApproximateProgressiveMorphologicalFilter::~ApproximateProgressiveMorphologicalFilter () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp index 89113d47262..9b6cb0147d8 100644 --- a/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/cpc_segmentation.hpp @@ -53,8 +53,7 @@ pcl::CPCSegmentation::CPCSegmentation () : } template -pcl::CPCSegmentation::~CPCSegmentation () -= default; +pcl::CPCSegmentation::~CPCSegmentation () = default; template void pcl::CPCSegmentation::segment () diff --git a/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp index f7272108e7e..cf00fa56a84 100644 --- a/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/crf_normal_segmentation.hpp @@ -47,13 +47,11 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::CrfNormalSegmentation::CrfNormalSegmentation () -= default; +pcl::CrfNormalSegmentation::CrfNormalSegmentation () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::CrfNormalSegmentation::~CrfNormalSegmentation () -= default; +pcl::CrfNormalSegmentation::~CrfNormalSegmentation () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp index b882ca52031..57213cf3e29 100644 --- a/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/crf_segmentation.hpp @@ -63,8 +63,7 @@ pcl::CrfSegmentation::CrfSegmentation () : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::CrfSegmentation::~CrfSegmentation () -= default; +pcl::CrfSegmentation::~CrfSegmentation () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp b/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp index 7aa6607398d..5d39a48d8a8 100644 --- a/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp +++ b/segmentation/include/pcl/segmentation/impl/lccp_segmentation.hpp @@ -66,8 +66,7 @@ pcl::LCCPSegmentation::LCCPSegmentation () : } template -pcl::LCCPSegmentation::~LCCPSegmentation () -= default; +pcl::LCCPSegmentation::~LCCPSegmentation () = default; template void pcl::LCCPSegmentation::reset () diff --git a/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp b/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp index 9130b753856..1c1ee2e0148 100644 --- a/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp +++ b/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp @@ -61,8 +61,7 @@ pcl::ProgressiveMorphologicalFilter::ProgressiveMorphologicalFilter () : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::ProgressiveMorphologicalFilter::~ProgressiveMorphologicalFilter () -= default; +pcl::ProgressiveMorphologicalFilter::~ProgressiveMorphologicalFilter () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp b/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp index b933ba35494..ea6d95fbfe4 100644 --- a/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp +++ b/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp @@ -60,8 +60,7 @@ pcl::SupervoxelClustering::SupervoxelClustering (float voxel_resolution, ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::SupervoxelClustering::~SupervoxelClustering () -= default; +pcl::SupervoxelClustering::~SupervoxelClustering () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp b/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp index cc208fc331d..a5fb5799d24 100644 --- a/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp +++ b/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp @@ -62,8 +62,7 @@ pcl::UnaryClassifier::UnaryClassifier () : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::UnaryClassifier::~UnaryClassifier () -= default; +pcl::UnaryClassifier::~UnaryClassifier () = default; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/include/pcl/surface/impl/marching_cubes.hpp b/surface/include/pcl/surface/impl/marching_cubes.hpp index 5869aeb200e..84f9304cc4e 100644 --- a/surface/include/pcl/surface/impl/marching_cubes.hpp +++ b/surface/include/pcl/surface/impl/marching_cubes.hpp @@ -43,8 +43,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::MarchingCubes::~MarchingCubes () -= default; +pcl::MarchingCubes::~MarchingCubes () = default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp b/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp index 6dba8205ba5..a87af9a334f 100644 --- a/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp +++ b/surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp @@ -40,8 +40,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::MarchingCubesHoppe::~MarchingCubesHoppe () -= default; +pcl::MarchingCubesHoppe::~MarchingCubesHoppe () = default; ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp b/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp index 73949e053be..9204ea505a1 100644 --- a/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp +++ b/surface/include/pcl/surface/impl/marching_cubes_rbf.hpp @@ -43,8 +43,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::MarchingCubesRBF::~MarchingCubesRBF () -= default; +pcl::MarchingCubesRBF::~MarchingCubesRBF () = default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/include/pcl/surface/impl/poisson.hpp b/surface/include/pcl/surface/impl/poisson.hpp index d564c1fca00..5261013bb3f 100644 --- a/surface/include/pcl/surface/impl/poisson.hpp +++ b/surface/include/pcl/surface/impl/poisson.hpp @@ -87,8 +87,7 @@ pcl::Poisson::Poisson () ////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::Poisson::~Poisson () -= default; +pcl::Poisson::~Poisson () = default; ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/surface/src/3rdparty/opennurbs/opennurbs_material.cpp b/surface/src/3rdparty/opennurbs/opennurbs_material.cpp index 03e6f456a62..c77a365d147 100644 --- a/surface/src/3rdparty/opennurbs/opennurbs_material.cpp +++ b/surface/src/3rdparty/opennurbs/opennurbs_material.cpp @@ -3814,7 +3814,7 @@ void AdjustMeshPeriodicTextureCoordinatesHelper( // map and clamp the tcs that hang over. If the mesh // has edges near the texture seam, the picture will // still look ok. - float f0=0.0f, f1=0.0f, twopitc = (float)two_pi_tc;; + float f0=0.0f, f1=0.0f, twopitc = (float)two_pi_tc; //int f0cnt=0, f1cnt=0; if ( 1 == ftc.quad[0] ) f0 += ftc.Tx[0]; else if ( 4 == ftc.quad[0] ) f1 += twopitc-ftc.Tx[0]; if ( 1 == ftc.quad[1] ) f0 += ftc.Tx[1]; else if ( 4 == ftc.quad[1] ) f1 += twopitc-ftc.Tx[1]; diff --git a/test/features/test_ii_normals.cpp b/test/features/test_ii_normals.cpp index 220f7792403..28a772a7ef1 100644 --- a/test/features/test_ii_normals.cpp +++ b/test/features/test_ii_normals.cpp @@ -227,9 +227,9 @@ TEST(PCL, IntegralImage1D) // set nans for odd fields if (xIdx & 1) { - data[row_stride * yIdx + element_stride * xIdx] = std::numeric_limits::quiet_NaN ();; - data[row_stride * yIdx + element_stride * xIdx + 1] = std::numeric_limits::quiet_NaN ();; - data[row_stride * yIdx + element_stride * xIdx + 2] = std::numeric_limits::quiet_NaN ();; + data[row_stride * yIdx + element_stride * xIdx] = std::numeric_limits::quiet_NaN (); + data[row_stride * yIdx + element_stride * xIdx + 1] = std::numeric_limits::quiet_NaN (); + data[row_stride * yIdx + element_stride * xIdx + 2] = std::numeric_limits::quiet_NaN (); } else { diff --git a/visualization/src/image_viewer.cpp b/visualization/src/image_viewer.cpp index 8e51598cd2e..a898c28ac47 100644 --- a/visualization/src/image_viewer.cpp +++ b/visualization/src/image_viewer.cpp @@ -898,8 +898,7 @@ pcl::visualization::ImageViewer::convertIntensityCloud8uToUChar ( ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// -pcl::visualization::ImageViewerInteractorStyle::ImageViewerInteractorStyle () -= default; +pcl::visualization::ImageViewerInteractorStyle::ImageViewerInteractorStyle () = default; ////////////////////////////////////////////////////////////////////////////////////////// void diff --git a/visualization/src/range_image_visualizer.cpp b/visualization/src/range_image_visualizer.cpp index 749548236a6..f294494778b 100644 --- a/visualization/src/range_image_visualizer.cpp +++ b/visualization/src/range_image_visualizer.cpp @@ -40,8 +40,7 @@ pcl::visualization::RangeImageVisualizer::RangeImageVisualizer (const std::strin { } -pcl::visualization::RangeImageVisualizer::~RangeImageVisualizer () -= default; +pcl::visualization::RangeImageVisualizer::~RangeImageVisualizer () = default; // void // pcl::visualization::RangeImageVisualizer::setRangeImage (const pcl::RangeImage& range_image, float min_value, float max_value, bool grayscale) From ee00b9bf169070ed5b71cd49aaf1903941f3e3ed Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Wed, 10 Mar 2021 16:04:44 -0800 Subject: [PATCH 07/16] Onelined more '= default' declarations [PCL-2731] Signed-off-by: Norm Evangelista --- filters/include/pcl/filters/grid_minimum.h | 3 +-- .../include/pcl/recognition/3rdparty/metslib/model.hh | 9 +++------ .../face_detection/face_detector_data_provider.h | 3 +-- segmentation/include/pcl/segmentation/comparator.h | 3 +-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/filters/include/pcl/filters/grid_minimum.h b/filters/include/pcl/filters/grid_minimum.h index 932b898b8b7..07dd118d261 100644 --- a/filters/include/pcl/filters/grid_minimum.h +++ b/filters/include/pcl/filters/grid_minimum.h @@ -77,8 +77,7 @@ namespace pcl } /** \brief Destructor. */ - ~GridMinimum () override - = default; + ~GridMinimum () override = default; /** \brief Set the grid resolution. * \param[in] resolution the grid resolution diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/model.hh b/recognition/include/pcl/recognition/3rdparty/metslib/model.hh index 327787fd675..55506640705 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/model.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/model.hh @@ -136,8 +136,7 @@ namespace mets { public: /// @brief Virtual dtor. virtual - ~feasible_solution() - = default; + ~feasible_solution() = default; }; @@ -311,8 +310,7 @@ namespace mets { public: virtual - ~move() - = default; + ~move() = default; /// /// @brief Evaluate the cost after the move. @@ -514,8 +512,7 @@ namespace mets { { } /// @brief Virtual destructor - virtual ~move_manager() - = default; + virtual ~move_manager() = default; /// @brief Selects a different set of moves at each iteration. virtual void diff --git a/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h b/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h index d0ff6be133a..51da6120ed0 100644 --- a/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h +++ b/recognition/include/pcl/recognition/face_detection/face_detector_data_provider.h @@ -122,8 +122,7 @@ namespace pcl min_images_per_bin_ = -1; } - virtual ~FaceDetectorDataProvider() - = default; + virtual ~FaceDetectorDataProvider() = default; void setPatchesPerImage(int n) { diff --git a/segmentation/include/pcl/segmentation/comparator.h b/segmentation/include/pcl/segmentation/comparator.h index e14178bebc6..c625d7794b3 100644 --- a/segmentation/include/pcl/segmentation/comparator.h +++ b/segmentation/include/pcl/segmentation/comparator.h @@ -68,8 +68,7 @@ namespace pcl /** \brief Empty destructor for comparator. */ virtual - ~Comparator () - = default; + ~Comparator () = default; /** \brief Set the input cloud for the comparator. * \param[in] cloud the point cloud this comparator will operate on From fd814ef46d2c4a8d1b6a267e5b211987064b33f5 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Wed, 10 Mar 2021 22:19:20 -0800 Subject: [PATCH 08/16] One-lined more '= default' conversions [PCL-2731] Signed-off-by: Norm Evangelista --- filters/include/pcl/filters/voxel_grid.h | 6 ++---- gpu/kinfu/src/cuda/ray_caster.cu | 2 +- keypoints/include/pcl/keypoints/agast_2d.h | 9 +++------ keypoints/include/pcl/keypoints/brisk_2d.h | 3 +-- .../outofcore/impl/outofcore_breadth_first_iterator.hpp | 3 +-- .../outofcore/impl/outofcore_depth_first_iterator.hpp | 3 +-- outofcore/include/pcl/outofcore/metadata.h | 6 ++---- .../include/pcl/outofcore/outofcore_iterator_base.h | 3 +-- outofcore/src/outofcore_node_data.cpp | 3 +-- test/search/test_organized_index.cpp | 3 +-- 10 files changed, 14 insertions(+), 27 deletions(-) diff --git a/filters/include/pcl/filters/voxel_grid.h b/filters/include/pcl/filters/voxel_grid.h index ebda20b5f43..2076708c3d5 100644 --- a/filters/include/pcl/filters/voxel_grid.h +++ b/filters/include/pcl/filters/voxel_grid.h @@ -210,8 +210,7 @@ namespace pcl } /** \brief Destructor. */ - ~VoxelGrid () override - = default; + ~VoxelGrid () override = default; /** \brief Set the voxel grid leaf size. * \param[in] leaf_size the voxel grid leaf size @@ -535,8 +534,7 @@ namespace pcl } /** \brief Destructor. */ - ~VoxelGrid () override - = default; + ~VoxelGrid () override = default; /** \brief Set the voxel grid leaf size. * \param[in] leaf_size the voxel grid leaf size diff --git a/gpu/kinfu/src/cuda/ray_caster.cu b/gpu/kinfu/src/cuda/ray_caster.cu index 2e06bc8a114..defa16f1448 100644 --- a/gpu/kinfu/src/cuda/ray_caster.cu +++ b/gpu/kinfu/src/cuda/ray_caster.cu @@ -273,7 +273,7 @@ namespace pcl break; } - } /* for(;) */ + } } }; diff --git a/keypoints/include/pcl/keypoints/agast_2d.h b/keypoints/include/pcl/keypoints/agast_2d.h index 1a2fc69a742..f0c7961a026 100644 --- a/keypoints/include/pcl/keypoints/agast_2d.h +++ b/keypoints/include/pcl/keypoints/agast_2d.h @@ -579,8 +579,7 @@ namespace pcl } /** \brief Destructor. */ - ~AgastKeypoint2DBase () override - = default; + ~AgastKeypoint2DBase () override = default; /** \brief Sets the threshold for corner detection. * \param[in] threshold the threshold used for corner detection. @@ -738,8 +737,7 @@ namespace pcl } /** \brief Destructor. */ - ~AgastKeypoint2D () - = default; + ~AgastKeypoint2D () = default; protected: /** \brief Detects the keypoints. @@ -788,8 +786,7 @@ namespace pcl } /** \brief Destructor. */ - ~AgastKeypoint2D () override - = default; + ~AgastKeypoint2D () override = default; protected: /** \brief Detects the keypoints. diff --git a/keypoints/include/pcl/keypoints/brisk_2d.h b/keypoints/include/pcl/keypoints/brisk_2d.h index e94a4565304..302b50512c5 100644 --- a/keypoints/include/pcl/keypoints/brisk_2d.h +++ b/keypoints/include/pcl/keypoints/brisk_2d.h @@ -97,8 +97,7 @@ namespace pcl } /** \brief Destructor. */ - ~BriskKeypoint2D () - = default; + ~BriskKeypoint2D () = default; /** \brief Sets the threshold for corner detection. * \param[in] threshold the threshold used for corner detection. diff --git a/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp b/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp index 2f09d5ac0a1..5724111185e 100644 --- a/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp +++ b/outofcore/include/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp @@ -54,8 +54,7 @@ namespace pcl //////////////////////////////////////////////////////////////////////////////// template - OutofcoreBreadthFirstIterator::~OutofcoreBreadthFirstIterator () - = default; + OutofcoreBreadthFirstIterator::~OutofcoreBreadthFirstIterator () = default; //////////////////////////////////////////////////////////////////////////////// diff --git a/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp b/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp index 00ea7721dcf..8a95d51297e 100644 --- a/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp +++ b/outofcore/include/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp @@ -57,8 +57,7 @@ namespace pcl //////////////////////////////////////////////////////////////////////////////// template - OutofcoreDepthFirstIterator::~OutofcoreDepthFirstIterator () - = default; + OutofcoreDepthFirstIterator::~OutofcoreDepthFirstIterator () = default; //////////////////////////////////////////////////////////////////////////////// diff --git a/outofcore/include/pcl/outofcore/metadata.h b/outofcore/include/pcl/outofcore/metadata.h index 95022dff57e..c7939f801f1 100644 --- a/outofcore/include/pcl/outofcore/metadata.h +++ b/outofcore/include/pcl/outofcore/metadata.h @@ -60,12 +60,10 @@ namespace pcl public: /** \brief Empty constructor */ - OutofcoreAbstractMetadata () - = default; + OutofcoreAbstractMetadata () = default; virtual - ~OutofcoreAbstractMetadata () - = default; + ~OutofcoreAbstractMetadata () = default; /** \brief Write the metadata in the on-disk format, e.g. JSON. */ virtual void diff --git a/outofcore/include/pcl/outofcore/outofcore_iterator_base.h b/outofcore/include/pcl/outofcore/outofcore_iterator_base.h index a4fe9cdf294..7ba3b1410ad 100644 --- a/outofcore/include/pcl/outofcore/outofcore_iterator_base.h +++ b/outofcore/include/pcl/outofcore/outofcore_iterator_base.h @@ -79,8 +79,7 @@ namespace pcl } virtual - ~OutofcoreIteratorBase () - = default; + ~OutofcoreIteratorBase () = default; OutofcoreIteratorBase (const OutofcoreIteratorBase& src) : octree_ (src.octree_), currentNode_ (src.currentNode_) diff --git a/outofcore/src/outofcore_node_data.cpp b/outofcore/src/outofcore_node_data.cpp index a54fd4734b5..54b9c6949a3 100644 --- a/outofcore/src/outofcore_node_data.cpp +++ b/outofcore/src/outofcore_node_data.cpp @@ -60,8 +60,7 @@ namespace pcl //////////////////////////////////////////////////////////////////////////////// - OutofcoreOctreeNodeMetadata::~OutofcoreOctreeNodeMetadata () - = default; + OutofcoreOctreeNodeMetadata::~OutofcoreOctreeNodeMetadata () = default; //////////////////////////////////////////////////////////////////////////////// diff --git a/test/search/test_organized_index.cpp b/test/search/test_organized_index.cpp index cf821b82fad..db8d4e09a3c 100644 --- a/test/search/test_organized_index.cpp +++ b/test/search/test_organized_index.cpp @@ -53,8 +53,7 @@ std::string pcd_filename; class prioPointQueueEntry { public: - prioPointQueueEntry () - = default; + prioPointQueueEntry () = default; prioPointQueueEntry (PointXYZ& point_arg, double pointDistance_arg, int pointIdx_arg) { point_ = point_arg; From 0aa88e80a990d04f807fc988da0fb89d72958d61 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Wed, 10 Mar 2021 22:22:45 -0800 Subject: [PATCH 09/16] Fixed a few EOL ;; instances [PCL-2731] Signed-off-by: Norm Evangelista --- filters/include/pcl/filters/voxel_grid_label.h | 2 +- keypoints/include/pcl/keypoints/iss_3d.h | 2 +- recognition/include/pcl/recognition/dot_modality.h | 2 +- sample_consensus/include/pcl/sample_consensus/sac.h | 4 ++-- sample_consensus/include/pcl/sample_consensus/sac_model.h | 2 +- segmentation/include/pcl/segmentation/grabcut_segmentation.h | 2 +- surface/include/pcl/surface/ear_clipping.h | 3 +-- surface/include/pcl/surface/organized_fast_mesh.h | 2 +- .../pcl/surface/simplification_remove_unused_vertices.h | 4 ++-- surface/src/3rdparty/opennurbs/opennurbs_3dm_settings.cpp | 2 +- surface/src/3rdparty/opennurbs/opennurbs_archive.cpp | 2 +- 11 files changed, 13 insertions(+), 14 deletions(-) diff --git a/filters/include/pcl/filters/voxel_grid_label.h b/filters/include/pcl/filters/voxel_grid_label.h index 3daa88d0cdd..44e5d9b964e 100644 --- a/filters/include/pcl/filters/voxel_grid_label.h +++ b/filters/include/pcl/filters/voxel_grid_label.h @@ -58,7 +58,7 @@ namespace pcl /** \brief Constructor. * Sets \ref leaf_size_ to 0. */ - VoxelGridLabel () = default;; + VoxelGridLabel () = default; protected: diff --git a/keypoints/include/pcl/keypoints/iss_3d.h b/keypoints/include/pcl/keypoints/iss_3d.h index d8ef0c9445e..fc957a18277 100644 --- a/keypoints/include/pcl/keypoints/iss_3d.h +++ b/keypoints/include/pcl/keypoints/iss_3d.h @@ -54,7 +54,7 @@ namespace pcl * Code example: * * \code - * pcl::PointCloud::Ptr model (new pcl::PointCloud ());; + * pcl::PointCloud::Ptr model (new pcl::PointCloud ()); * pcl::PointCloud::Ptr model_keypoints (new pcl::PointCloud ()); * pcl::search::KdTree::Ptr tree (new pcl::search::KdTree ()); * diff --git a/recognition/include/pcl/recognition/dot_modality.h b/recognition/include/pcl/recognition/dot_modality.h index a34d2139240..a2c1bed7349 100644 --- a/recognition/include/pcl/recognition/dot_modality.h +++ b/recognition/include/pcl/recognition/dot_modality.h @@ -48,7 +48,7 @@ namespace pcl { public: - virtual ~DOTModality () = default;; + virtual ~DOTModality () = default; //virtual QuantizedMap & //getDominantQuantizedMap () = 0; diff --git a/sample_consensus/include/pcl/sample_consensus/sac.h b/sample_consensus/include/pcl/sample_consensus/sac.h index ba9e038cc8c..64ac36e7ba7 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac.h +++ b/sample_consensus/include/pcl/sample_consensus/sac.h @@ -63,7 +63,7 @@ namespace pcl private: /** \brief Constructor for base SAC. */ - SampleConsensus () = default;; + SampleConsensus () = default; public: using Ptr = shared_ptr >; @@ -130,7 +130,7 @@ namespace pcl } /** \brief Destructor for base SAC. */ - virtual ~SampleConsensus () = default;; + virtual ~SampleConsensus () = default; /** \brief Set the distance to model threshold. * \param[in] threshold distance to model threshold diff --git a/sample_consensus/include/pcl/sample_consensus/sac_model.h b/sample_consensus/include/pcl/sample_consensus/sac_model.h index 5706d852dde..5590be96c33 100644 --- a/sample_consensus/include/pcl/sample_consensus/sac_model.h +++ b/sample_consensus/include/pcl/sample_consensus/sac_model.h @@ -162,7 +162,7 @@ namespace pcl }; /** \brief Destructor for base SampleConsensusModel. */ - virtual ~SampleConsensusModel () = default;; + virtual ~SampleConsensusModel () = default; /** \brief Get a set of random data samples and return them as point * indices. diff --git a/segmentation/include/pcl/segmentation/grabcut_segmentation.h b/segmentation/include/pcl/segmentation/grabcut_segmentation.h index f7435da6d22..b864b9ec824 100644 --- a/segmentation/include/pcl/segmentation/grabcut_segmentation.h +++ b/segmentation/include/pcl/segmentation/grabcut_segmentation.h @@ -336,7 +336,7 @@ namespace pcl , initialized_ (false) {} /// Destructor - ~GrabCut () = default;; + ~GrabCut () = default; // /// Set input cloud void setInputCloud (const PointCloudConstPtr& cloud) override; diff --git a/surface/include/pcl/surface/ear_clipping.h b/surface/include/pcl/surface/ear_clipping.h index a4c7c33ad23..e2d1b920332 100644 --- a/surface/include/pcl/surface/ear_clipping.h +++ b/surface/include/pcl/surface/ear_clipping.h @@ -58,8 +58,7 @@ namespace pcl using MeshProcessing::input_mesh_; using MeshProcessing::initCompute; /** \brief Empty constructor */ - EarClipping () - = default;; + EarClipping () = default; protected: /** \brief a Pointer to the point cloud data. */ diff --git a/surface/include/pcl/surface/organized_fast_mesh.h b/surface/include/pcl/surface/organized_fast_mesh.h index 21b8f66b53a..4aeafec644f 100644 --- a/surface/include/pcl/surface/organized_fast_mesh.h +++ b/surface/include/pcl/surface/organized_fast_mesh.h @@ -105,7 +105,7 @@ namespace pcl }; /** \brief Destructor. */ - ~OrganizedFastMesh () override = default;; + ~OrganizedFastMesh () override = default; /** \brief Set a maximum edge length. * Using not only the scalar \a a, but also \a b and \a c, allows for using a distance threshold in the form of: diff --git a/surface/include/pcl/surface/simplification_remove_unused_vertices.h b/surface/include/pcl/surface/simplification_remove_unused_vertices.h index eb2b415ce80..4aee8c7c337 100644 --- a/surface/include/pcl/surface/simplification_remove_unused_vertices.h +++ b/surface/include/pcl/surface/simplification_remove_unused_vertices.h @@ -55,9 +55,9 @@ namespace pcl using ConstPtr = shared_ptr; /** \brief Constructor. */ - SimplificationRemoveUnusedVertices () = default;; + SimplificationRemoveUnusedVertices () = default; /** \brief Destructor. */ - ~SimplificationRemoveUnusedVertices () = default;; + ~SimplificationRemoveUnusedVertices () = default; /** \brief Simply a polygonal mesh. * \param[in] input the input mesh diff --git a/surface/src/3rdparty/opennurbs/opennurbs_3dm_settings.cpp b/surface/src/3rdparty/opennurbs/opennurbs_3dm_settings.cpp index 4672fbf7f5f..e1b8bdfcc46 100644 --- a/surface/src/3rdparty/opennurbs/opennurbs_3dm_settings.cpp +++ b/surface/src/3rdparty/opennurbs/opennurbs_3dm_settings.cpp @@ -708,7 +708,7 @@ ON_3dmAnnotationSettings& ON_3dmAnnotationSettings::operator=(const ON_3dmAnnota m_arrowlength = src.m_arrowlength; m_arrowwidth = src.m_arrowwidth; m_centermark = src.m_centermark; - m_dimunits = src.m_dimunits;; + m_dimunits = src.m_dimunits; m_arrowtype = src.m_arrowtype; m_angularunits = src.m_angularunits; m_lengthformat = src.m_lengthformat; diff --git a/surface/src/3rdparty/opennurbs/opennurbs_archive.cpp b/surface/src/3rdparty/opennurbs/opennurbs_archive.cpp index a743663fd6c..f4da1709a32 100644 --- a/surface/src/3rdparty/opennurbs/opennurbs_archive.cpp +++ b/surface/src/3rdparty/opennurbs/opennurbs_archive.cpp @@ -2608,7 +2608,7 @@ ON_BinaryArchive::ReadSize(std::size_t* sz) bool ON_BinaryArchive::WriteBigSize(std::size_t sz) { ON__UINT64 u = (ON__UINT64)sz; - return WriteInt64(1,(ON__INT64*)&u);; + return WriteInt64(1,(ON__INT64*)&u); } bool ON_BinaryArchive::ReadBigSize( std::size_t* sz ) From d4f614d239397860ae1446c1ec6608cc1bda29fe Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Thu, 11 Mar 2021 10:57:23 -0800 Subject: [PATCH 10/16] Caught some escapes from recent rebase [PCL-2731] Signed-off-by: Norm Evangelista --- filters/include/pcl/filters/impl/shadowpoints.hpp | 4 ++-- .../include/pcl/outofcore/impl/octree_base.hpp | 4 ++-- .../pcl/outofcore/impl/octree_base_node.hpp | 14 +++++++------- .../pcl/outofcore/impl/octree_disk_container.hpp | 6 +++--- .../include/pcl/outofcore/octree_disk_container.h | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/filters/include/pcl/filters/impl/shadowpoints.hpp b/filters/include/pcl/filters/impl/shadowpoints.hpp index eedd66fc4fc..f2246ee6f15 100644 --- a/filters/include/pcl/filters/impl/shadowpoints.hpp +++ b/filters/include/pcl/filters/impl/shadowpoints.hpp @@ -46,7 +46,7 @@ template void pcl::ShadowPoints::applyFilter (PointCloud &output) { - assert (input_normals_ != NULL); + assert (input_normals_ != nullptr); output.resize (input_->size ()); if (extract_removed_indices_) removed_indices_->resize (input_->size ()); @@ -83,7 +83,7 @@ pcl::ShadowPoints::applyFilter (PointCloud &output) template void pcl::ShadowPoints::applyFilter (Indices &indices) { - assert (input_normals_ != NULL); + assert (input_normals_ != nullptr); indices.resize (input_->size ()); if (extract_removed_indices_) removed_indices_->resize (indices_->size ()); diff --git a/outofcore/include/pcl/outofcore/impl/octree_base.hpp b/outofcore/include/pcl/outofcore/impl/octree_base.hpp index feac27c8b99..3a078b4df27 100644 --- a/outofcore/include/pcl/outofcore/impl/octree_base.hpp +++ b/outofcore/include/pcl/outofcore/impl/octree_base.hpp @@ -573,7 +573,7 @@ namespace pcl std::vector current_branch (number_of_nodes, static_cast(nullptr)); current_branch[0] = root_node_; - assert (current_branch.back () != 0); + assert (current_branch.back () != nullptr); this->buildLODRecursive (current_branch); } @@ -615,7 +615,7 @@ namespace pcl for (std::int64_t level = static_cast(current_branch.size ()-1); level >= 1; level--) { BranchNode* target_parent = current_branch[level-1]; - assert (target_parent != 0); + assert (target_parent != nullptr); double exponent = static_cast(current_branch.size () - target_parent->getDepth ()); double current_depth_sample_percent = pow (sample_percent_, exponent); diff --git a/outofcore/include/pcl/outofcore/impl/octree_base_node.hpp b/outofcore/include/pcl/outofcore/impl/octree_base_node.hpp index d16efe8a3ee..24d1c080191 100644 --- a/outofcore/include/pcl/outofcore/impl/octree_base_node.hpp +++ b/outofcore/include/pcl/outofcore/impl/octree_base_node.hpp @@ -191,7 +191,7 @@ namespace pcl , payload_ () , node_metadata_ (new OutofcoreOctreeNodeMetadata ()) { - assert (tree != NULL); + assert (tree != nullptr); node_metadata_->setOutofcoreVersion (3); init_root_node (bb_min, bb_max, tree, root_name); } @@ -201,7 +201,7 @@ namespace pcl template void OutofcoreOctreeBaseNode::init_root_node (const Eigen::Vector3d& bb_min, const Eigen::Vector3d& bb_max, OutofcoreOctreeBase * const tree, const boost::filesystem::path& root_name) { - assert (tree != NULL); + assert (tree != nullptr); parent_ = nullptr; root_node_ = this; @@ -494,7 +494,7 @@ namespace pcl template std::uint64_t OutofcoreOctreeBaseNode::addPointCloud (const typename pcl::PCLPointCloud2::Ptr& input_cloud, const bool skip_bb_check) { - assert (this->root_node_->m_tree_ != NULL); + assert (this->root_node_->m_tree_ != nullptr); if (input_cloud->height*input_cloud->width == 0) return (0); @@ -558,7 +558,7 @@ namespace pcl template void OutofcoreOctreeBaseNode::randomSample(const AlignedPointTVector& p, AlignedPointTVector& insertBuff, const bool skip_bb_check) { - assert (this->root_node_->m_tree_ != NULL); + assert (this->root_node_->m_tree_ != nullptr); AlignedPointTVector sampleBuff; if (!skip_bb_check) @@ -613,7 +613,7 @@ namespace pcl template std::uint64_t OutofcoreOctreeBaseNode::addDataAtMaxDepth (const AlignedPointTVector& p, const bool skip_bb_check) { - assert (this->root_node_->m_tree_ != NULL); + assert (this->root_node_->m_tree_ != nullptr); // Trust me, just add the points if (skip_bb_check) @@ -807,7 +807,7 @@ namespace pcl // when adding data and generating sampled LOD // If the max depth has been reached - assert (this->root_node_->m_tree_ != NULL ); + assert (this->root_node_->m_tree_ != nullptr ); if (this->depth_ == this->root_node_->m_tree_->getDepth ()) { @@ -1719,7 +1719,7 @@ namespace pcl this->parent_ = super; root_node_ = super->root_node_; m_tree_ = super->root_node_->m_tree_; - assert (m_tree_ != NULL); + assert (m_tree_ != nullptr); depth_ = super->depth_ + 1; num_children_ = 0; diff --git a/outofcore/include/pcl/outofcore/impl/octree_disk_container.hpp b/outofcore/include/pcl/outofcore/impl/octree_disk_container.hpp index 5dffdb8c8ba..f1cb632c645 100644 --- a/outofcore/include/pcl/outofcore/impl/octree_disk_container.hpp +++ b/outofcore/include/pcl/outofcore/impl/octree_disk_container.hpp @@ -206,7 +206,7 @@ namespace pcl PointT temp; //open our file FILE* f = fopen (disk_storage_filename_.c_str (), "rbe"); - assert (f != NULL); + assert (f != nullptr); //seek the right length; int seekret = _fseeki64 (f, idx * sizeof(PointT), SEEK_SET); @@ -331,7 +331,7 @@ namespace pcl std::sort (offsets.begin (), offsets.end ()); FILE* f = fopen (disk_storage_filename_.c_str (), "rbe"); - assert (f != NULL); + assert (f != nullptr); PointT p; char* loc = reinterpret_cast (&p); @@ -430,7 +430,7 @@ namespace pcl std::sort (offsets.begin (), offsets.end ()); FILE* f = fopen (disk_storage_filename_.c_str (), "rbe"); - assert (f != NULL); + assert (f != nullptr); PointT p; char* loc = reinterpret_cast (&p); for (std::uint64_t i = 0; i < filesamp; i++) diff --git a/outofcore/include/pcl/outofcore/octree_disk_container.h b/outofcore/include/pcl/outofcore/octree_disk_container.h index 9e70ce7e1d1..99d07a47d6f 100644 --- a/outofcore/include/pcl/outofcore/octree_disk_container.h +++ b/outofcore/include/pcl/outofcore/octree_disk_container.h @@ -228,7 +228,7 @@ namespace pcl FILE* fxyz = fopen (path.string ().c_str (), "we"); FILE* f = fopen (disk_storage_filename_.c_str (), "rbe"); - assert (f != NULL); + assert (f != nullptr); std::uint64_t num = size (); PointT p; From 948f06e025531370359bb0b61aee362fe458bef9 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Thu, 11 Mar 2021 16:05:02 -0800 Subject: [PATCH 11/16] Fixed one overlooked conversion to "using" [PCL-2731] Signed-off-by: Norm Evangelista --- surface/include/pcl/surface/bilateral_upsampling.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surface/include/pcl/surface/bilateral_upsampling.h b/surface/include/pcl/surface/bilateral_upsampling.h index 6fac8ce58b0..1c3601b3bfc 100644 --- a/surface/include/pcl/surface/bilateral_upsampling.h +++ b/surface/include/pcl/surface/bilateral_upsampling.h @@ -63,7 +63,7 @@ namespace pcl class BilateralUpsampling: public CloudSurfaceProcessing { public: - typedef shared_ptr > Ptr; + using Ptr = shared_ptr >; using ConstPtr = shared_ptr >; using PCLBase::input_; From b3d834d134a9f62b55c531a283d8585b6887e9b5 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Fri, 12 Mar 2021 08:18:01 -0800 Subject: [PATCH 12/16] Fixed yet more split '= default' instances [PCL-2731] Signed-off-by: Norm Evangelista --- io/include/pcl/compression/color_coding.h | 3 +-- io/include/pcl/compression/octree_pointcloud_compression.h | 3 +-- .../pcl/compression/organized_pointcloud_compression.h | 6 ++---- io/include/pcl/compression/point_coding.h | 3 +-- .../pcl/recognition/3rdparty/metslib/abstract-search.hh | 6 ++---- .../include/pcl/recognition/3rdparty/metslib/tabu-search.hh | 6 ++---- segmentation/include/pcl/segmentation/planar_region.h | 3 +-- 7 files changed, 10 insertions(+), 20 deletions(-) diff --git a/io/include/pcl/compression/color_coding.h b/io/include/pcl/compression/color_coding.h index d48b5bd6097..c37131a2db8 100644 --- a/io/include/pcl/compression/color_coding.h +++ b/io/include/pcl/compression/color_coding.h @@ -71,8 +71,7 @@ class ColorCoding /** \brief Empty class constructor. */ virtual - ~ColorCoding () - = default; + ~ColorCoding () = default; /** \brief Define color bit depth of encoded color information. * \param bitDepth_arg: amounts of bits for representing one color component diff --git a/io/include/pcl/compression/octree_pointcloud_compression.h b/io/include/pcl/compression/octree_pointcloud_compression.h index 5c9085cf834..dafa8b9540c 100644 --- a/io/include/pcl/compression/octree_pointcloud_compression.h +++ b/io/include/pcl/compression/octree_pointcloud_compression.h @@ -119,8 +119,7 @@ namespace pcl /** \brief Empty deconstructor. */ - ~OctreePointCloudCompression () override - = default; + ~OctreePointCloudCompression () override = default; /** \brief Initialize globals */ void initialization () { diff --git a/io/include/pcl/compression/organized_pointcloud_compression.h b/io/include/pcl/compression/organized_pointcloud_compression.h index 5cc2ebfcf81..1e0b3cdb325 100644 --- a/io/include/pcl/compression/organized_pointcloud_compression.h +++ b/io/include/pcl/compression/organized_pointcloud_compression.h @@ -60,12 +60,10 @@ namespace pcl using PointCloudConstPtr = typename PointCloud::ConstPtr; /** \brief Empty Constructor. */ - OrganizedPointCloudCompression () - = default; + OrganizedPointCloudCompression () = default; /** \brief Empty deconstructor. */ - virtual ~OrganizedPointCloudCompression () - = default; + virtual ~OrganizedPointCloudCompression () = default; /** \brief Encode point cloud to output stream * \param[in] cloud_arg: point cloud to be compressed diff --git a/io/include/pcl/compression/point_coding.h b/io/include/pcl/compression/point_coding.h index 38ab6303a17..d12a07f52bd 100644 --- a/io/include/pcl/compression/point_coding.h +++ b/io/include/pcl/compression/point_coding.h @@ -68,8 +68,7 @@ class PointCoding /** \brief Empty class constructor. */ virtual - ~PointCoding () - = default; + ~PointCoding () = default; /** \brief Define precision of point information * \param precision_arg: precision diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh b/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh index 93f979cda01..a67bd601186 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/abstract-search.hh @@ -110,8 +110,7 @@ namespace mets { /// @brief Virtual destructor. - ~abstract_search() override - = default;; + ~abstract_search() override = default; enum { /// @brief We just made a move. @@ -254,8 +253,7 @@ namespace mets { /// @brief Virtual destructor virtual - ~search_listener() - = default; + ~search_listener() = default; /// @brief This is the callback method called by searches /// when a move, an improvement or something else happens diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh b/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh index 43cd87a9c03..1a92a0bf7e7 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/tabu-search.hh @@ -68,8 +68,7 @@ namespace mets { /// @brief Virtual destructor. virtual - ~aspiration_criteria_chain() - = default; + ~aspiration_criteria_chain() = default; /// @brief A method to reset this aspiration criteria chain to its /// original state. @@ -129,8 +128,7 @@ namespace mets { /// @brief Virtual destructor virtual - ~tabu_list_chain() - = default; + ~tabu_list_chain() = default; /// /// @brief Make a move tabu when starting from a certain solution. diff --git a/segmentation/include/pcl/segmentation/planar_region.h b/segmentation/include/pcl/segmentation/planar_region.h index 8ed517318ea..acdd7e3c77c 100644 --- a/segmentation/include/pcl/segmentation/planar_region.h +++ b/segmentation/include/pcl/segmentation/planar_region.h @@ -59,8 +59,7 @@ namespace pcl public: /** \brief Empty constructor for PlanarRegion. */ - PlanarRegion () - = default; + PlanarRegion () = default; /** \brief Constructor for Planar region from a Region3D and a PlanarPolygon. * \param[in] region a Region3D for the input data From 4bc502b98831cbe66119f2b9c9d10c4fc2e2f9e8 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Fri, 12 Mar 2021 08:21:36 -0800 Subject: [PATCH 13/16] Reverted clang-tidy changes for C header [PCL-2731] Signed-off-by: Norm Evangelista --- outofcore/include/pcl/outofcore/cJSON.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/outofcore/include/pcl/outofcore/cJSON.h b/outofcore/include/pcl/outofcore/cJSON.h index 04630d17122..d8d6943f06d 100644 --- a/outofcore/include/pcl/outofcore/cJSON.h +++ b/outofcore/include/pcl/outofcore/cJSON.h @@ -44,37 +44,23 @@ extern "C" #define cJSON_IsReference 256 /* The cJSON structure: */ -using cJSON = struct cJSON { - +typedef struct cJSON { struct cJSON *next,*prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */ - struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ - - int type; /* The type of the item, as above. */ - - char *valuestring; /* The item's string, if type==cJSON_String */ - int valueint; /* The item's number, if type==cJSON_Number */ - double valuedouble; /* The item's number, if type==cJSON_Number */ - - char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ +} cJSON; -}; - -using cJSON_Hooks = struct cJSON_Hooks { - +typedef struct cJSON_Hooks { void *(*malloc_fn)(std::size_t sz); - void (*free_fn)(void *ptr); - -}; +} cJSON_Hooks; /* Supply malloc, realloc and free functions to cJSON */ PCLAPI(void) cJSON_InitHooks(cJSON_Hooks* hooks); From 0255b69bbd9c27cd67e14363946320f6967bb001 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Fri, 12 Mar 2021 09:34:25 -0800 Subject: [PATCH 14/16] Fixed yet more split '= default' [PCL-2731] Signed-off-by: Norm Evangelista --- .../pcl/filters/voxel_grid_occlusion_estimation.h | 3 +-- io/include/pcl/compression/entropy_range_coder.h | 9 +++------ .../recognition/3rdparty/metslib/simulated-annealing.hh | 7 ++----- .../recognition/3rdparty/metslib/termination-criteria.hh | 3 +-- .../face_detection/rf_face_detector_trainer.h | 3 +-- .../pcl/recognition/face_detection/rf_face_utils.h | 3 +-- recognition/include/pcl/recognition/linemod.h | 6 ++---- recognition/include/pcl/recognition/linemod/line_rgbd.h | 3 +-- recognition/include/pcl/recognition/ransac_based/bvh.h | 3 +-- .../include/pcl/recognition/ransac_based/model_library.h | 3 +-- .../include/pcl/recognition/ransac_based/trimmed_icp.h | 3 +-- search/include/pcl/search/brute_force.h | 3 +-- search/include/pcl/search/kdtree.h | 3 +-- search/include/pcl/search/octree.h | 3 +-- search/include/pcl/search/search.h | 3 +-- .../organized_connected_component_segmentation.h | 3 +-- .../segmentation/organized_multi_plane_segmentation.h | 3 +-- .../pcl/segmentation/plane_coefficient_comparator.h | 3 +-- .../pcl/segmentation/plane_refinement_comparator.h | 3 +-- surface/include/pcl/surface/texture_mapping.h | 3 +-- visualization/src/cloud_viewer.cpp | 3 +-- 21 files changed, 25 insertions(+), 51 deletions(-) diff --git a/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h b/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h index 41a13d9e725..3d4f8d98a8b 100644 --- a/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h +++ b/filters/include/pcl/filters/voxel_grid_occlusion_estimation.h @@ -74,8 +74,7 @@ namespace pcl } /** \brief Destructor. */ - ~VoxelGridOcclusionEstimation () override - = default; + ~VoxelGridOcclusionEstimation () override = default; /** \brief Initialize the voxel grid, needs to be called first * Builts the voxel grid and computes additional values for diff --git a/io/include/pcl/compression/entropy_range_coder.h b/io/include/pcl/compression/entropy_range_coder.h index a24b64fa94a..d973cde5782 100644 --- a/io/include/pcl/compression/entropy_range_coder.h +++ b/io/include/pcl/compression/entropy_range_coder.h @@ -68,13 +68,11 @@ namespace pcl public: /** \brief Empty constructor. */ - AdaptiveRangeCoder () - = default; + AdaptiveRangeCoder () = default; /** \brief Empty deconstructor. */ virtual - ~AdaptiveRangeCoder () - = default; + ~AdaptiveRangeCoder () = default; /** \brief Encode char vector to output stream * \param inputByteVector_arg input vector @@ -121,8 +119,7 @@ namespace pcl /** \brief Empty deconstructor. */ virtual - ~StaticRangeCoder () - = default; + ~StaticRangeCoder () = default; /** \brief Encode integer vector to output stream * \param[in] inputIntVector_arg input vector diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh b/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh index 610e74a3880..446a4a1f209 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/simulated-annealing.hh @@ -50,13 +50,10 @@ namespace mets { { public: /// @brief Constructor - abstract_cooling_schedule() - = default; + abstract_cooling_schedule() = default; /// @brief Virtual destructor - virtual - ~abstract_cooling_schedule() - = default; + virtual ~abstract_cooling_schedule() = default; /// @brief The function that updates the SA temperature. /// diff --git a/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh b/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh index 592969f0496..5c50d601962 100644 --- a/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh +++ b/recognition/include/pcl/recognition/3rdparty/metslib/termination-criteria.hh @@ -58,8 +58,7 @@ namespace mets { /// @brief Virtual destructor. virtual - ~termination_criteria_chain() - = default; + ~termination_criteria_chain() = default; /// @brief Alternate function that decides if we shoud terminate the /// search process diff --git a/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h b/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h index eb95b055c46..2fb4d80408b 100644 --- a/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h +++ b/recognition/include/pcl/recognition/face_detection/rf_face_detector_trainer.h @@ -76,8 +76,7 @@ namespace pcl res_ = 0.005f; } - virtual ~RFFaceDetectorTrainer() - = default; + virtual ~RFFaceDetectorTrainer() = default; /* * Common parameters diff --git a/recognition/include/pcl/recognition/face_detection/rf_face_utils.h b/recognition/include/pcl/recognition/face_detection/rf_face_utils.h index 8fd671d368d..208a4d9b475 100644 --- a/recognition/include/pcl/recognition/face_detection/rf_face_utils.h +++ b/recognition/include/pcl/recognition/face_detection/rf_face_utils.h @@ -204,8 +204,7 @@ namespace pcl } /** \brief Destructor. */ - ~PoseClassRegressionVarianceStatsEstimator() override - = default; + ~PoseClassRegressionVarianceStatsEstimator() override = default; /** \brief Returns the number of branches the corresponding tree has. */ inline std::size_t getNumOfBranches() const override diff --git a/recognition/include/pcl/recognition/linemod.h b/recognition/include/pcl/recognition/linemod.h index 48bdbea73ae..3837f2b25d2 100644 --- a/recognition/include/pcl/recognition/linemod.h +++ b/recognition/include/pcl/recognition/linemod.h @@ -60,8 +60,7 @@ namespace pcl } /** \brief Destructor. */ - virtual ~EnergyMaps () - = default; + virtual ~EnergyMaps () = default; /** \brief Returns the width of the energy maps. */ inline std::size_t @@ -204,8 +203,7 @@ namespace pcl } /** \brief Destructor. */ - virtual ~LinearizedMaps () - = default; + virtual ~LinearizedMaps () = default; /** \brief Returns the width of the linearized map. */ inline std::size_t diff --git a/recognition/include/pcl/recognition/linemod/line_rgbd.h b/recognition/include/pcl/recognition/linemod/line_rgbd.h index cf33c352a78..08f7292f3e9 100644 --- a/recognition/include/pcl/recognition/linemod/line_rgbd.h +++ b/recognition/include/pcl/recognition/linemod/line_rgbd.h @@ -105,8 +105,7 @@ namespace pcl } /** \brief Destructor */ - virtual ~LineRGBD () - = default; + virtual ~LineRGBD () = default; /** \brief Loads templates from a LMT (LineMod Template) file. Overrides old templates. * diff --git a/recognition/include/pcl/recognition/ransac_based/bvh.h b/recognition/include/pcl/recognition/ransac_based/bvh.h index 0ee7dc57e8e..593f5359ca8 100644 --- a/recognition/include/pcl/recognition/ransac_based/bvh.h +++ b/recognition/include/pcl/recognition/ransac_based/bvh.h @@ -73,8 +73,7 @@ namespace pcl { } - virtual ~BoundedObject () - = default; + virtual ~BoundedObject () = default; /** \brief This method is for std::sort. */ inline static bool diff --git a/recognition/include/pcl/recognition/ransac_based/model_library.h b/recognition/include/pcl/recognition/ransac_based/model_library.h index bc0d7d0d350..222a6c7a883 100644 --- a/recognition/include/pcl/recognition/ransac_based/model_library.h +++ b/recognition/include/pcl/recognition/ransac_based/model_library.h @@ -120,8 +120,7 @@ namespace pcl } } - virtual ~Model () - = default; + virtual ~Model () = default; inline const std::string& getObjectName () const diff --git a/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h b/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h index 42931b4029b..88af254d20b 100644 --- a/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h +++ b/recognition/include/pcl/recognition/ransac_based/trimmed_icp.h @@ -72,8 +72,7 @@ namespace pcl : new_to_old_energy_ratio_ (0.99f) {} - ~TrimmedICP () override - = default; + ~TrimmedICP () override = default; /** \brief Call this method before calling align(). * diff --git a/search/include/pcl/search/brute_force.h b/search/include/pcl/search/brute_force.h index 50d771edf97..0a7a610f7cc 100644 --- a/search/include/pcl/search/brute_force.h +++ b/search/include/pcl/search/brute_force.h @@ -91,8 +91,7 @@ namespace pcl /** \brief Destructor for KdTree. */ - ~BruteForce () override - = default; + ~BruteForce () override = default; /** \brief Search for the k-nearest neighbors for the given query point. * \param[in] point the given query point diff --git a/search/include/pcl/search/kdtree.h b/search/include/pcl/search/kdtree.h index 074c4a97618..c0503a12588 100644 --- a/search/include/pcl/search/kdtree.h +++ b/search/include/pcl/search/kdtree.h @@ -90,8 +90,7 @@ namespace pcl /** \brief Destructor for KdTree. */ - ~KdTree () override - = default; + ~KdTree () override = default; /** \brief Provide a pointer to the point representation to use to convert points into k-D vectors. * \param[in] point_representation the const boost shared pointer to a PointRepresentation diff --git a/search/include/pcl/search/octree.h b/search/include/pcl/search/octree.h index e6bff6ce7c4..d320c064d4f 100644 --- a/search/include/pcl/search/octree.h +++ b/search/include/pcl/search/octree.h @@ -96,8 +96,7 @@ namespace pcl /** \brief Empty Destructor. */ - ~Octree () override - = default; + ~Octree () override = default; /** \brief Provide a pointer to the input dataset. * \param[in] cloud the const boost shared pointer to a PointCloud message diff --git a/search/include/pcl/search/search.h b/search/include/pcl/search/search.h index def848bd9f6..396e1829d10 100644 --- a/search/include/pcl/search/search.h +++ b/search/include/pcl/search/search.h @@ -89,8 +89,7 @@ namespace pcl /** Destructor. */ virtual - ~Search () - = default; + ~Search () = default; /** \brief Returns the search method name */ diff --git a/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h b/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h index f29007e1fad..30890706c57 100644 --- a/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h +++ b/segmentation/include/pcl/segmentation/organized_connected_component_segmentation.h @@ -85,8 +85,7 @@ namespace pcl /** \brief Destructor for OrganizedConnectedComponentSegmentation. */ - ~OrganizedConnectedComponentSegmentation () override - = default; + ~OrganizedConnectedComponentSegmentation () override = default; /** \brief Provide a pointer to the comparator to be used for segmentation. * \param[in] compare the comparator diff --git a/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h b/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h index 7e303e8b12a..462e5e1fa95 100644 --- a/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h +++ b/segmentation/include/pcl/segmentation/organized_multi_plane_segmentation.h @@ -102,8 +102,7 @@ namespace pcl /** \brief Destructor for OrganizedMultiPlaneSegmentation. */ - ~OrganizedMultiPlaneSegmentation () override - = default; + ~OrganizedMultiPlaneSegmentation () override = default; /** \brief Provide a pointer to the input normals. * \param[in] normals the input normal cloud diff --git a/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h b/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h index ece87f4981c..194ef685c11 100644 --- a/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h +++ b/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h @@ -92,8 +92,7 @@ namespace pcl /** \brief Destructor for PlaneCoefficientComparator. */ - ~PlaneCoefficientComparator () override - = default; + ~PlaneCoefficientComparator () override = default; void setInputCloud (const PointCloudConstPtr& cloud) override diff --git a/segmentation/include/pcl/segmentation/plane_refinement_comparator.h b/segmentation/include/pcl/segmentation/plane_refinement_comparator.h index cdf76fc08b2..ea0699302a9 100644 --- a/segmentation/include/pcl/segmentation/plane_refinement_comparator.h +++ b/segmentation/include/pcl/segmentation/plane_refinement_comparator.h @@ -95,8 +95,7 @@ namespace pcl } /** \brief Destructor for PlaneCoefficientComparator. */ - ~PlaneRefinementComparator () override - = default; + ~PlaneRefinementComparator () override = default; /** \brief Set the vector of model coefficients to which we will compare. * \param[in] models a vector of model coefficients produced by the initial segmentation step. diff --git a/surface/include/pcl/surface/texture_mapping.h b/surface/include/pcl/surface/texture_mapping.h index 0b6be76ecf6..b7318cc8e4a 100644 --- a/surface/include/pcl/surface/texture_mapping.h +++ b/surface/include/pcl/surface/texture_mapping.h @@ -122,8 +122,7 @@ namespace pcl } /** \brief Destructor. */ - ~TextureMapping () - = default; + ~TextureMapping () = default; /** \brief Set mesh scale control * \param[in] f diff --git a/visualization/src/cloud_viewer.cpp b/visualization/src/cloud_viewer.cpp index a8f0acde12b..fe69f107e31 100644 --- a/visualization/src/cloud_viewer.cpp +++ b/visualization/src/cloud_viewer.cpp @@ -150,8 +150,7 @@ struct pcl::visualization::CloudViewer::CloudViewer_impl } } - ~CloudViewer_impl () - = default; + ~CloudViewer_impl () = default; //////////////////////////////////////////////////////////////////////////////////////////// template void From a92ee8e3d06a6f682497a7afbbf06ef1586286c0 Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Fri, 12 Mar 2021 14:01:00 -0800 Subject: [PATCH 15/16] Caught another split '= default' [PCL-2731] Signed-off-by: Norm Evangelista --- recognition/include/pcl/recognition/ransac_based/hypothesis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recognition/include/pcl/recognition/ransac_based/hypothesis.h b/recognition/include/pcl/recognition/ransac_based/hypothesis.h index 7b20c373d71..92bd1a19744 100644 --- a/recognition/include/pcl/recognition/ransac_based/hypothesis.h +++ b/recognition/include/pcl/recognition/ransac_based/hypothesis.h @@ -95,7 +95,7 @@ namespace pcl { } - ~Hypothesis () override= default; + ~Hypothesis () override = default; const Hypothesis& operator =(const Hypothesis& src) From d2543d5c836bade5203b521485aaf9364cad722b Mon Sep 17 00:00:00 2001 From: Norm Evangelista Date: Fri, 12 Mar 2021 22:34:03 -0800 Subject: [PATCH 16/16] Fixed issues flagged by review [PCL-2731] Signed-off-by: Norm Evangelista --- .../include/pcl/recognition/ransac_based/hypothesis.h | 2 +- .../pcl/recognition/ransac_based/obj_rec_ransac.h | 8 ++++---- .../include/pcl/recognition/ransac_based/orr_graph.h | 4 ++-- .../include/pcl/recognition/ransac_based/orr_octree.h | 2 +- .../recognition/ransac_based/rigid_transform_space.h | 10 +++++----- surface/include/pcl/surface/mls.h | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/recognition/include/pcl/recognition/ransac_based/hypothesis.h b/recognition/include/pcl/recognition/ransac_based/hypothesis.h index 92bd1a19744..9f38761d857 100644 --- a/recognition/include/pcl/recognition/ransac_based/hypothesis.h +++ b/recognition/include/pcl/recognition/ransac_based/hypothesis.h @@ -65,7 +65,7 @@ namespace pcl memcpy (rigid_transform_, rigid_transform, 12*sizeof (float)); } - virtual ~HypothesisBase ()= default; + virtual ~HypothesisBase () = default; void setModel (const ModelLibrary::Model* model) diff --git a/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h b/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h index 9a19b947266..4066bd159ea 100644 --- a/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h +++ b/recognition/include/pcl/recognition/ransac_based/obj_rec_ransac.h @@ -104,7 +104,7 @@ namespace pcl { memcpy(this->rigid_transform_, rigid_transform, 12*sizeof (float)); } - virtual ~Output ()= default; + virtual ~Output () = default; public: std::string object_name_; @@ -121,7 +121,7 @@ namespace pcl { } - virtual ~OrientedPointPair ()= default; + virtual ~OrientedPointPair () = default; public: const float *p1_, *n1_, *p2_, *n2_; @@ -130,8 +130,8 @@ namespace pcl class HypothesisCreator { public: - HypothesisCreator ()= default; - virtual ~HypothesisCreator ()= default; + HypothesisCreator () = default; + virtual ~HypothesisCreator () = default; Hypothesis* create (const SimpleOctree::Node* ) const { return new Hypothesis ();} }; diff --git a/recognition/include/pcl/recognition/ransac_based/orr_graph.h b/recognition/include/pcl/recognition/ransac_based/orr_graph.h index b55674f4da9..ec1fc292104 100644 --- a/recognition/include/pcl/recognition/ransac_based/orr_graph.h +++ b/recognition/include/pcl/recognition/ransac_based/orr_graph.h @@ -69,7 +69,7 @@ namespace pcl state_(UNDEF) {} - virtual ~Node ()= default; + virtual ~Node () = default; inline const std::set& getNeighbors () const @@ -124,7 +124,7 @@ namespace pcl }; public: - ORRGraph ()= default; + ORRGraph () = default; virtual ~ORRGraph (){ this->clear ();} inline void diff --git a/recognition/include/pcl/recognition/ransac_based/orr_octree.h b/recognition/include/pcl/recognition/ransac_based/orr_octree.h index 76ecb7b7c37..f89e9827032 100644 --- a/recognition/include/pcl/recognition/ransac_based/orr_octree.h +++ b/recognition/include/pcl/recognition/ransac_based/orr_octree.h @@ -89,7 +89,7 @@ namespace pcl n_[0] = n_[1] = n_[2] = p_[0] = p_[1] = p_[2] = 0.0f; } - virtual~ Data ()= default; + virtual~ Data () = default; inline void addToPoint (float x, float y, float z) diff --git a/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h b/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h index 8bfaab73f8d..8ac2bd8cb43 100644 --- a/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h +++ b/recognition/include/pcl/recognition/ransac_based/rigid_transform_space.h @@ -138,7 +138,7 @@ namespace pcl };// class Entry public: - RotationSpaceCell ()= default; + RotationSpaceCell () = default; virtual ~RotationSpaceCell () { model_to_entry_.clear (); @@ -174,8 +174,8 @@ namespace pcl class RotationSpaceCellCreator { public: - RotationSpaceCellCreator ()= default; - virtual ~RotationSpaceCellCreator ()= default; + RotationSpaceCellCreator () = default; + virtual ~RotationSpaceCellCreator () = default; RotationSpaceCell* create (const SimpleOctree::Node* ) { @@ -297,7 +297,7 @@ namespace pcl : counter_ (0) {} - virtual ~RotationSpaceCreator()= default; + virtual ~RotationSpaceCreator() = default; RotationSpace* create(const SimpleOctree::Node* leaf) { @@ -340,7 +340,7 @@ namespace pcl class PCL_EXPORTS RigidTransformSpace { public: - RigidTransformSpace ()= default; + RigidTransformSpace () = default; virtual ~RigidTransformSpace (){ this->clear ();} inline void diff --git a/surface/include/pcl/surface/mls.h b/surface/include/pcl/surface/mls.h index 83355227396..d88738a0ce1 100644 --- a/surface/include/pcl/surface/mls.h +++ b/surface/include/pcl/surface/mls.h @@ -261,7 +261,7 @@ namespace pcl class MovingLeastSquares : public CloudSurfaceProcessing { public: - typedef shared_ptr > Ptr; + using Ptr = shared_ptr >; using ConstPtr = shared_ptr >; using PCLBase::input_;