spatial_index<...> - use operator>> for reading Value's + update shape_index_featureset
This commit is contained in:
parent
fa3ab5077e
commit
99617ad71c
2 changed files with 11 additions and 2 deletions
|
@ -103,8 +103,8 @@ void spatial_index<Value, Filter, InputStream>::query_node(Filter const& filter,
|
|||
for (int i = 0; i < num_shapes; ++i)
|
||||
{
|
||||
Value item;
|
||||
in.read(reinterpret_cast<char*>(&item), sizeof(item)); // FIXME : use operator>>
|
||||
results.push_back(item);
|
||||
in >> item;
|
||||
results.push_back(std::move(item));
|
||||
}
|
||||
|
||||
int children = read_ndr_integer(in);
|
||||
|
|
|
@ -40,6 +40,15 @@
|
|||
#include "shape_utils.hpp"
|
||||
#include <mapnik/util/spatial_index.hpp>
|
||||
|
||||
|
||||
// operator>> needed by mapnik::spatial_index<Value, Filter, InputStream>
|
||||
template <typename InputStream>
|
||||
InputStream & operator>>(InputStream & in, std::streampos pos)
|
||||
{
|
||||
in.read(reinterpret_cast<char*>(&pos), sizeof(std::streampos));
|
||||
return in;
|
||||
}
|
||||
|
||||
using mapnik::feature_factory;
|
||||
|
||||
template <typename filterT>
|
||||
|
|
Loading…
Reference in a new issue