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

Prevent infinite recursion in getPointCloudDifference #2401

Closed
SergioRAgostinho opened this issue Aug 26, 2018 · 0 comments
Closed

Prevent infinite recursion in getPointCloudDifference #2401

SergioRAgostinho opened this issue Aug 26, 2018 · 0 comments
Labels
good first issue Skills/areas of expertise needed to tackle the issue module: segmentation
Milestone

Comments

@SergioRAgostinho
Copy link
Member

SergioRAgostinho commented Aug 26, 2018

template <typename PointT>
PCL_DEPRECATED("getPointCloudDifference() does not use the tgt parameter, thus it is deprecated and will be removed in future releases.")
inline void getPointCloudDifference (
const pcl::PointCloud<PointT> &src,
const pcl::PointCloud<PointT> &tgt,
double threshold,
const boost::shared_ptr<pcl::search::Search<PointT> > &tree,
pcl::PointCloud<PointT> &output)
{
getPointCloudDifference<PointT> (src, pcl::PointCloud<PointT>(), threshold, tree, output);
}

Needs to be changed to

  template <typename PointT>
  PCL_DEPRECATED("getPointCloudDifference() does not use the tgt parameter, thus it is deprecated and will be removed in future releases.")
  inline void getPointCloudDifference (
      const pcl::PointCloud<PointT> &src,
      const pcl::PointCloud<PointT> &, // removed parameter to suppress warning
      double threshold,
      const boost::shared_ptr<pcl::search::Search<PointT> > &tree,
      pcl::PointCloud<PointT> &output)
  {
    getPointCloudDifference<PointT> (src, threshold, tree, output); // without the extra parameter
  }

to prevent an infinite recursion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Skills/areas of expertise needed to tackle the issue module: segmentation
Projects
None yet
Development

No branches or pull requests

1 participant