Skip to content

Commit 112d870

Browse files
Migrate unordered_map from boost -> std (#3107)
* [registration] Add custom hasher to PPFHashMapSearch
1 parent 13e3050 commit 112d870

File tree

17 files changed

+45
-32
lines changed

17 files changed

+45
-32
lines changed

apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/boost.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
# pragma GCC system_header
4545
#endif
4646

47-
#include <boost/unordered_map.hpp>
4847
#include <boost/bind/bind.hpp>
4948
#include <boost/math/special_functions/fpclassify.hpp>
5049
#include <boost/shared_ptr.hpp>

apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/opengl_viewer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <mutex>
5252
#include <iomanip>
5353
#include <string>
54+
#include <unordered_map>
5455

5556
namespace pcl
5657
{
@@ -332,7 +333,7 @@ namespace pcl
332333
typedef Eigen::Matrix <unsigned char, 3, Eigen::Dynamic> Colors;
333334
typedef Eigen::Matrix <unsigned char, 3, 256 > Colormap;
334335

335-
typedef boost::unordered_map <std::string, CloudXYZRGBNormalPtr> CloudXYZRGBNormalMap;
336+
typedef std::unordered_map <std::string, CloudXYZRGBNormalPtr> CloudXYZRGBNormalMap;
336337

337338
typedef pcl::ihs::PointIHS PointIHS;
338339
typedef pcl::ihs::CloudIHS CloudIHS;
@@ -342,7 +343,7 @@ namespace pcl
342343
typedef pcl::ihs::detail::FaceVertexMesh FaceVertexMesh;
343344
typedef boost::shared_ptr < FaceVertexMesh> FaceVertexMeshPtr;
344345
typedef boost::shared_ptr <const FaceVertexMesh> FaceVertexMeshConstPtr;
345-
typedef boost::unordered_map <std::string, FaceVertexMeshPtr> FaceVertexMeshMap;
346+
typedef std::unordered_map <std::string, FaceVertexMeshPtr> FaceVertexMeshMap;
346347

347348
/** \brief Check if the mesh with the given id is added.
348349
* \note Must lock the mutex before calling this method.

features/include/pcl/features/boost.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
# pragma GCC system_header
4444
#endif
4545

46-
#include <boost/unordered_map.hpp>
4746
#include <boost/function.hpp>
4847
#include <boost/bind.hpp>
4948
#include <boost/property_map/property_map.hpp>
50-
//#include <boost/graph/adjacency_list.hpp>
51-
//#include <boost/graph/johnson_all_pairs_shortest.hpp>

filters/include/pcl/filters/boost.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#include <boost/make_shared.hpp>
5252
#include <boost/dynamic_bitset.hpp>
5353
#include <boost/mpl/size.hpp>
54-
#include <boost/unordered_map.hpp>
5554
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
5655
#include <boost/bind.hpp>
5756
#include <boost/function.hpp>

filters/include/pcl/filters/impl/uniform_sampling.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ pcl::UniformSampling<PointT>::applyFilter (PointCloud &output)
133133
output.points.resize (leaves_.size ());
134134
int cp = 0;
135135

136-
for (typename boost::unordered_map<size_t, Leaf>::const_iterator it = leaves_.begin (); it != leaves_.end (); ++it)
137-
output.points[cp++] = input_->points[it->second.idx];
136+
for (const auto& leaf : leaves_)
137+
output.points[cp++] = input_->points[leaf.second.idx];
138138
output.width = static_cast<uint32_t> (output.points.size ());
139139
}
140140

filters/include/pcl/filters/uniform_sampling.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
#pragma once
4141

4242
#include <pcl/filters/filter.h>
43-
#include <boost/unordered_map.hpp>
43+
44+
#include <unordered_map>
4445

4546
namespace pcl
4647
{
@@ -115,7 +116,7 @@ namespace pcl
115116
};
116117

117118
/** \brief The 3D grid leaves. */
118-
boost::unordered_map<size_t, Leaf> leaves_;
119+
std::unordered_map<size_t, Leaf> leaves_;
119120

120121
/** \brief The size of a leaf. */
121122
Eigen::Vector4f leaf_size_;

recognition/include/pcl/recognition/boost.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,4 @@
4343
# pragma GCC system_header
4444
#endif
4545

46-
#include <boost/unordered_map.hpp>
4746
#include <boost/graph/graph_traits.hpp>
48-
//#include <boost/graph/adjacency_list.hpp>

recognition/include/pcl/recognition/cg/hough_3d.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
#include <pcl/recognition/boost.h>
4444
#include <pcl/point_types.h>
4545

46+
#include <unordered_map>
47+
4648
namespace pcl
4749
{
4850
namespace recognition
@@ -122,10 +124,9 @@ namespace pcl
122124

123125
/** \brief The Hough Space. */
124126
std::vector<double> hough_space_;
125-
//boost::unordered_map<int, double> hough_space_;
126127

127128
/** \brief List of voters for each bin. */
128-
boost::unordered_map<int, std::vector<int> > voter_ids_;
129+
std::unordered_map<int, std::vector<int> > voter_ids_;
129130
};
130131
}
131132

registration/include/pcl/registration/boost.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#include <boost/graph/dijkstra_shortest_paths.hpp>
4949
#include <boost/property_map/property_map.hpp>
5050

51-
#include <boost/unordered_map.hpp>
5251
#include <boost/noncopyable.hpp>
5352
#include <boost/make_shared.hpp>
5453
#include <boost/function.hpp>

registration/include/pcl/registration/correspondence_rejection_features.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#include <pcl/point_representation.h>
4646
#include <pcl/registration/boost.h>
4747

48+
#include <unordered_map>
49+
4850
namespace pcl
4951
{
5052
namespace registration
@@ -163,7 +165,7 @@ namespace pcl
163165
typedef boost::shared_ptr<FeatureContainerInterface> Ptr;
164166
};
165167

166-
typedef boost::unordered_map<std::string, FeatureContainerInterface::Ptr> FeaturesMap;
168+
typedef std::unordered_map<std::string, FeatureContainerInterface::Ptr> FeaturesMap;
167169

168170
/** \brief An STL map containing features to use when performing the correspondence search.*/
169171
FeaturesMap features_map_;

0 commit comments

Comments
 (0)