Skip to content

Commit

Permalink
+ use std::deque for caching features.
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Jan 18, 2013
1 parent dc19a6a commit 1ef9ec2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/mapnik/memory_featureset.hpp
Expand Up @@ -45,7 +45,7 @@ class memory_featureset : public Featureset
bbox_check_(bbox_check)
{}

memory_featureset(box2d<double> const& bbox, std::vector<feature_ptr> const& features, bool bbox_check = true)
memory_featureset(box2d<double> const& bbox, std::deque<feature_ptr> const& features, bool bbox_check = true)
: bbox_(bbox),
pos_(features.begin()),
end_(features.end()),
Expand Down Expand Up @@ -92,8 +92,8 @@ class memory_featureset : public Featureset

private:
box2d<double> bbox_;
std::vector<feature_ptr>::const_iterator pos_;
std::vector<feature_ptr>::const_iterator end_;
std::deque<feature_ptr>::const_iterator pos_;
std::deque<feature_ptr>::const_iterator end_;
datasource::datasource_t type_;
bool bbox_check_;
};
Expand Down
3 changes: 2 additions & 1 deletion plugins/input/csv/csv_datasource.hpp
Expand Up @@ -38,6 +38,7 @@

// stl
#include <vector>
#include <deque>
#include <string>

class csv_datasource : public mapnik::datasource
Expand Down Expand Up @@ -66,7 +67,7 @@ class csv_datasource : public mapnik::datasource
std::string inline_string_;
unsigned file_length_;
mapnik::value_integer row_limit_;
std::vector<mapnik::feature_ptr> features_;
std::deque<mapnik::feature_ptr> features_;
std::string escape_;
std::string separator_;
std::string quote_;
Expand Down

0 comments on commit 1ef9ec2

Please sign in to comment.