diff --git a/filters/include/pcl/filters/boost.h b/filters/include/pcl/filters/boost.h index b7feccf8fb2..88ae24d709b 100644 --- a/filters/include/pcl/filters/boost.h +++ b/filters/include/pcl/filters/boost.h @@ -54,5 +54,4 @@ #include #include #include -#include #include diff --git a/filters/include/pcl/filters/model_outlier_removal.h b/filters/include/pcl/filters/model_outlier_removal.h index d968def0065..5aad78594ff 100644 --- a/filters/include/pcl/filters/model_outlier_removal.h +++ b/filters/include/pcl/filters/model_outlier_removal.h @@ -173,7 +173,7 @@ namespace pcl * \param[in] thresh pointer to a threshold function */ void - setThresholdFunction (boost::function thresh) + setThresholdFunction (std::function thresh) { threshold_function_ = thresh; } @@ -235,7 +235,7 @@ namespace pcl /** \brief The type of model to use (user given parameter). */ pcl::SacModel model_type_; - boost::function threshold_function_; + std::function threshold_function_; inline bool checkSingleThreshold (double value) diff --git a/keypoints/include/pcl/keypoints/keypoint.h b/keypoints/include/pcl/keypoints/keypoint.h index 8b24101329e..ce5d3dc5417 100644 --- a/keypoints/include/pcl/keypoints/keypoint.h +++ b/keypoints/include/pcl/keypoints/keypoint.h @@ -39,10 +39,10 @@ // PCL includes #include -#include #include #include #include +#include namespace pcl { @@ -67,8 +67,8 @@ namespace pcl typedef typename PointCloudIn::Ptr PointCloudInPtr; typedef typename PointCloudIn::ConstPtr PointCloudInConstPtr; typedef pcl::PointCloud PointCloudOut; - typedef boost::function &, std::vector &)> SearchMethod; - typedef boost::function &, std::vector &)> SearchMethodSurface; + typedef std::function &, std::vector &)> SearchMethod; + typedef std::function &, std::vector &)> SearchMethodSurface; public: /** \brief Empty constructor. */ diff --git a/octree/include/pcl/octree/boost.h b/octree/include/pcl/octree/boost.h index f5cde574898..8db30618fb2 100644 --- a/octree/include/pcl/octree/boost.h +++ b/octree/include/pcl/octree/boost.h @@ -45,4 +45,3 @@ // Marking all Boost headers as system headers to remove warnings #include -#include diff --git a/octree/include/pcl/octree/octree_pointcloud_adjacency.h b/octree/include/pcl/octree/octree_pointcloud_adjacency.h index 15077fb3c7e..47ada826b39 100644 --- a/octree/include/pcl/octree/octree_pointcloud_adjacency.h +++ b/octree/include/pcl/octree/octree_pointcloud_adjacency.h @@ -154,7 +154,7 @@ namespace pcl * \param[in] transform_func A boost:function pointer to the transform to be used. The transform must have one * parameter (a point) which it modifies in place. */ void - setTransformFunction (boost::function transform_func) + setTransformFunction (std::function transform_func) { transform_func_ = transform_func; } @@ -216,7 +216,7 @@ namespace pcl /// Local leaf pointer vector used to make iterating through leaves fast. LeafVectorT leaf_vector_; - boost::function transform_func_; + std::function transform_func_; }; diff --git a/people/apps/main_ground_based_people_detection.cpp b/people/apps/main_ground_based_people_detection.cpp index c61b17382e4..e0e0b609b9c 100644 --- a/people/apps/main_ground_based_people_detection.cpp +++ b/people/apps/main_ground_based_people_detection.cpp @@ -142,7 +142,7 @@ int main (int argc, char** argv) PointCloudT::Ptr cloud (new PointCloudT); bool new_cloud_available_flag = false; pcl::Grabber* interface = new pcl::OpenNIGrabber(); - boost::function::ConstPtr&)> f = + std::function::ConstPtr&)> f = boost::bind (&cloud_cb_, _1, cloud, &new_cloud_available_flag); interface->registerCallback (f); interface->start (); diff --git a/segmentation/include/pcl/segmentation/conditional_euclidean_clustering.h b/segmentation/include/pcl/segmentation/conditional_euclidean_clustering.h index d1904322481..4823e5f5efc 100644 --- a/segmentation/include/pcl/segmentation/conditional_euclidean_clustering.h +++ b/segmentation/include/pcl/segmentation/conditional_euclidean_clustering.h @@ -37,11 +37,11 @@ #pragma once -#include - #include #include +#include + namespace pcl { typedef std::vector IndicesClusters; @@ -148,7 +148,7 @@ namespace pcl /** \brief Set the condition that needs to hold for neighboring points to be considered part of the same cluster. * This is an overloaded function provided for convenience. See the documentation for setConditionFunction(). */ inline void - setConditionFunction (boost::function condition_function) + setConditionFunction (std::function condition_function) { condition_function_ = condition_function; } @@ -237,7 +237,7 @@ namespace pcl SearcherPtr searcher_; /** \brief The condition function that needs to hold for clustering */ - boost::function condition_function_; + std::function condition_function_; /** \brief The distance to scan for cluster candidates (default = 0.0) */ float cluster_tolerance_; diff --git a/surface/include/pcl/surface/boost.h b/surface/include/pcl/surface/boost.h index 731defeefbc..dc522b99af0 100644 --- a/surface/include/pcl/surface/boost.h +++ b/surface/include/pcl/surface/boost.h @@ -44,7 +44,6 @@ #endif #include -#include #include #include #include diff --git a/surface/include/pcl/surface/impl/mls.hpp b/surface/include/pcl/surface/impl/mls.hpp index 368690f0aba..d26b9f47ac4 100644 --- a/surface/include/pcl/surface/impl/mls.hpp +++ b/surface/include/pcl/surface/impl/mls.hpp @@ -719,7 +719,7 @@ pcl::MLSResult::computeMLSSurface (const pcl::PointCloud &cloud, const std::vector &nn_indices, double search_radius, int polynomial_order, - boost::function weight_func) + std::function weight_func) { // Compute the plane coefficients EIGEN_ALIGN16 Eigen::Matrix3d covariance_matrix; @@ -777,7 +777,7 @@ pcl::MLSResult::computeMLSSurface (const pcl::PointCloud &cloud, { // Note: The max_sq_radius parameter is only used if weight_func was not defined double max_sq_radius = 1; - if (weight_func.empty()) + if (!weight_func) { max_sq_radius = search_radius * search_radius; weight_func = boost::bind (&pcl::MLSResult::computeMLSWeight, this, _1, max_sq_radius); diff --git a/surface/include/pcl/surface/mls.h b/surface/include/pcl/surface/mls.h index 4fbeafa7262..c159e6b5312 100644 --- a/surface/include/pcl/surface/mls.h +++ b/surface/include/pcl/surface/mls.h @@ -39,11 +39,10 @@ #pragma once +#include #include #include -#include - // PCL includes #include #include @@ -210,7 +209,7 @@ namespace pcl const std::vector &nn_indices, double search_radius, int polynomial_order = 2, - boost::function weight_func = {}); + std::function weight_func = {}); Eigen::Vector3d query_point; /**< \brief The query point about which the mls surface was generated */ Eigen::Vector3d mean; /**< \brief The mean point of all the neighbors. */ @@ -274,7 +273,7 @@ namespace pcl typedef typename PointCloudIn::Ptr PointCloudInPtr; typedef typename PointCloudIn::ConstPtr PointCloudInConstPtr; - typedef boost::function &, std::vector &)> SearchMethod; + typedef std::function &, std::vector &)> SearchMethod; enum UpsamplingMethod {