Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part G of transition to support modernize-use-default-member-init #5860

Merged
Merged
Prev Previous commit
Next Next commit
Made more changes per review
  • Loading branch information
gnawme committed Nov 3, 2023
commit bca4d31fa29881c7b7dbec22df63d034fb0acbe7
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class LabeledEuclideanClusterExtraction : public PCLBase<PointT> {

/** \brief The maximum number of labels we can find in this pointcloud (default =
* MAXINT)*/
unsigned int max_label_{0};
unsigned int max_label_{std::numeric_limits<int>::max()};

/** \brief Class getName method. */
virtual std::string
Expand Down
11 changes: 1 addition & 10 deletions segmentation/include/pcl/segmentation/impl/region_growing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,7 @@

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename PointT, typename NormalT>
pcl::RegionGrowing<PointT, NormalT>::RegionGrowing()
: max_pts_per_cluster_(std::numeric_limits<pcl::uindex_t>::max())
, theta_threshold_(30.0f / 180.0f * static_cast<float>(M_PI))
, search_()
, normals_()
, point_neighbours_(0)
, point_labels_(0)
, num_pts_in_segment_(0)
, clusters_(0)
{}
pcl::RegionGrowing<PointT, NormalT>::RegionGrowing() = default;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename PointT, typename NormalT>
Expand Down
8 changes: 4 additions & 4 deletions segmentation/include/pcl/segmentation/region_growing.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,21 @@ namespace pcl
NormalPtr normals_{nullptr};

/** \brief Contains neighbours of each point. */
std::vector<pcl::Indices> point_neighbours_;
std::vector<pcl::Indices> point_neighbours_{};

/** \brief Point labels that tells to which segment each point belongs. */
std::vector<int> point_labels_;
std::vector<int> point_labels_{};

/** \brief If set to true then normal/smoothness test will be done during segmentation.
* It is always set to true for the usual region growing algorithm. It is used for turning on/off the test
* for smoothness in the child class RegionGrowingRGB.*/
bool normal_flag_{true};

/** \brief Tells how much points each segment contains. Used for reserving memory. */
std::vector<pcl::uindex_t> num_pts_in_segment_;
std::vector<pcl::uindex_t> num_pts_in_segment_{};

/** \brief After the segmentation it will contain the segments. */
std::vector <pcl::PointIndices> clusters_;
std::vector <pcl::PointIndices> clusters_{};

/** \brief Stores the number of segments. */
int number_of_segments_{0};
Expand Down