Commit 807fc3ae authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix some compilation issues with GCC 4.7

parent 03d646d3
......@@ -438,7 +438,7 @@ public:
double operator()(size_t k, size_t s) const
{
const typeof(_NNks[k])& nnks = _NNks.find(k)->second;
const unordered_map<size_t,double>& nnks = _NNks.find(k)->second;
const typeof(nnks.begin()) iter = nnks.find(s);
if (iter != nnks.end())
return iter->second;
......
......@@ -74,9 +74,6 @@ public:
const IndexMap& index = IndexMap())
: store(new std::vector<T>(initial_size)), index(index) {}
checked_vector_property_map(const unchecked_t& map)
: checked_vector_property_map(map.get_checked()) {}
typename std::vector<T>::iterator storage_begin()
{
return store->begin();
......
......@@ -20,6 +20,7 @@
#include <vector>
#include <utility>
#include <algorithm>
#include <boost/array.hpp>
#define BOOST_DISABLE_ASSERTS
#include <boost/multi_array.hpp>
......@@ -118,7 +119,7 @@ public:
v[i] >= _data_range[i].second)
return; // out of bounds
}
bin[i] = (v[i] - _data_range[i].first) / delta;
if (bin[i] >= _counts.shape()[i]) // modify shape
{
......@@ -194,8 +195,8 @@ public:
typename Histogram::bin_t shape;
for (size_t i = 0; i < this->_counts.num_dimensions(); ++i)
shape[i] = max(this->_counts.shape()[i],
_sum->GetArray().shape()[i]);
shape[i] = std::max(this->_counts.shape()[i],
_sum->GetArray().shape()[i]);
_sum->GetArray().resize(shape);
for (size_t i = 0; i < this->_counts.num_elements(); ++i)
{
......
......@@ -98,9 +98,9 @@ struct get_sampled_distance_histogram
for (i = 0; i < int(n_samples); ++i)
{
vertex_t v;
tr1::uniform_int<size_t> randint(0, sources.size()-1);
{
#pragma omp critical
tr1::uniform_int<size_t> randint(0, sources.size()-1);
size_t i = randint(rng);
v = sources[i];
swap(sources[i], sources.back());
......
Markdown is supported
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