mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +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 <limits.h>
|
||||
// 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>
|
||||
#else
|
||||
#include <map>
|
||||
@@ -127,7 +127,7 @@ class LshTable
|
||||
public:
|
||||
/** 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;
|
||||
#else
|
||||
typedef std::map<BucketKey, Bucket> BucketsSpace;
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
*/
|
||||
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);
|
||||
#endif
|
||||
// Add the features to the table
|
||||
|
||||
Reference in New Issue
Block a user