mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
flann serialize unordered_map compilation error (#126): modified define name to avoid conflicts with the one defined in OpenCV
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
// TODO as soon as we use C++0x, use the code in USE_UNORDERED_MAP
|
// TODO as soon as we use C++0x, use the code in USE_UNORDERED_MAP
|
||||||
#if USE_UNORDERED_MAP
|
#if RTFLANN_USE_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -127,7 +127,7 @@ class LshTable
|
|||||||
public:
|
public:
|
||||||
/** A container of all the feature indices. Optimized for space
|
/** A container of all the feature indices. Optimized for space
|
||||||
*/
|
*/
|
||||||
#if USE_UNORDERED_MAP
|
#if RTFLANN_USE_UNORDERED_MAP
|
||||||
typedef std::unordered_map<BucketKey, Bucket> BucketsSpace;
|
typedef std::unordered_map<BucketKey, Bucket> BucketsSpace;
|
||||||
#else
|
#else
|
||||||
typedef std::map<BucketKey, Bucket> BucketsSpace;
|
typedef std::map<BucketKey, Bucket> BucketsSpace;
|
||||||
@@ -187,7 +187,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void add(const std::vector< std::pair<size_t, ElementType*> >& features)
|
void add(const std::vector< std::pair<size_t, ElementType*> >& features)
|
||||||
{
|
{
|
||||||
#if USE_UNORDERED_MAP
|
#if RTFLANN_USE_UNORDERED_MAP
|
||||||
buckets_space_.rehash((buckets_space_.size() + features.size()) * 1.2);
|
buckets_space_.rehash((buckets_space_.size() + features.size()) * 1.2);
|
||||||
#endif
|
#endif
|
||||||
// Add the features to the table
|
// Add the features to the table
|
||||||
|
|||||||
Reference in New Issue
Block a user