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

Consistent ptr typedefs for kd tree flann #1607

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kdtree/include/pcl/kdtree/impl/kdtree_flann.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pcl::KdTreeFLANN<PointT, Dist>::KdTreeFLANN (bool sorted)

///////////////////////////////////////////////////////////////////////////////////////////
template <typename PointT, typename Dist>
pcl::KdTreeFLANN<PointT, Dist>::KdTreeFLANN (const KdTreeFLANN<PointT> &k)
pcl::KdTreeFLANN<PointT, Dist>::KdTreeFLANN (const KdTreeFLANN<PointT, Dist> &k)
: pcl::KdTree<PointT> (false)
, flann_index_ (), cloud_ ()
, index_mapping_ (), identity_mapping_ (false)
Expand Down
12 changes: 6 additions & 6 deletions kdtree/include/pcl/kdtree/kdtree_flann.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ namespace pcl
typedef ::flann::Index<Dist> FLANNIndex;

// Boost shared pointers
typedef boost::shared_ptr<KdTreeFLANN<PointT> > Ptr;
typedef boost::shared_ptr<const KdTreeFLANN<PointT> > ConstPtr;
typedef boost::shared_ptr<KdTreeFLANN<PointT, Dist> > Ptr;
typedef boost::shared_ptr<const KdTreeFLANN<PointT, Dist> > ConstPtr;

/** \brief Default Constructor for KdTreeFLANN.
* \param[in] sorted set to true if the application that the tree will be used for requires sorted nearest neighbor indices (default). False otherwise.
Expand All @@ -99,13 +99,13 @@ namespace pcl
/** \brief Copy constructor
* \param[in] k the tree to copy into this
*/
KdTreeFLANN (const KdTreeFLANN<PointT> &k);
KdTreeFLANN (const KdTreeFLANN<PointT, Dist> &k);

/** \brief Copy operator
* \param[in] k the tree to copy into this
*/
inline KdTreeFLANN<PointT>&
operator = (const KdTreeFLANN<PointT>& k)
inline KdTreeFLANN<PointT, Dist>&
operator = (const KdTreeFLANN<PointT, Dist>& k)
{
KdTree<PointT>::operator=(k);
flann_index_ = k.flann_index_;
Expand All @@ -128,7 +128,7 @@ namespace pcl
void
setSortedResults (bool sorted);

inline Ptr makeShared () { return Ptr (new KdTreeFLANN<PointT> (*this)); }
inline Ptr makeShared () { return Ptr (new KdTreeFLANN<PointT, Dist> (*this)); }

/** \brief Destructor for KdTreeFLANN.
* Deletes all allocated data arrays and destroys the kd-tree structures.
Expand Down