Commit 9b60fa96 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Fix imgpo compilation without TBB

parent db059b1f
......@@ -8,12 +8,11 @@
#include <Eigen/Core>
#ifdef USE_TBB
#include <map>
#include <tbb/task_scheduler_init.h>
#include <tbb/parallel_for.h>
#include <tbb/concurrent_hash_map.h>
#else
#include <map>
#endif
#include <limbo/tools/macros.hpp>
......@@ -271,9 +270,16 @@ bool is_in_argv(int argc, char** argv, const char* needle)
template <typename T1, typename T2>
void add_to_results(const char* key, T1& map, const T2& p)
{
#ifdef USE_TBB
typename T1::accessor a;
if (!map.find(a, key))
map.insert(a, key);
#else
typename T1::iterator a;
a = map.find(key);
if (a == map.end())
map[key] = std::vector<std::pair<double, double>>();
#endif
a->second.push_back(p);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment