initialize context in init list

This commit is contained in:
Dane Springmeyer 2012-02-02 08:58:20 -08:00
parent 17d13cff67
commit 0e701dd899
2 changed files with 3 additions and 3 deletions

View file

@ -46,9 +46,9 @@ shape_featureset<filterT>::shape_featureset(filterT const& filter,
tr_(new transcoder(encoding)), tr_(new transcoder(encoding)),
file_length_(file_length), file_length_(file_length),
row_limit_(row_limit), row_limit_(row_limit),
count_(0) count_(0),
ctx_(boost::make_shared<mapnik::context_type>())
{ {
ctx_ = boost::make_shared<mapnik::context_type>();
shape_.shp().skip(100); shape_.shp().skip(100);
setup_attributes(ctx_, attribute_names, shape_name, shape_,attr_ids_); setup_attributes(ctx_, attribute_names, shape_name, shape_,attr_ids_);
} }

View file

@ -43,7 +43,6 @@ template <typename filterT>
class shape_featureset : public Featureset class shape_featureset : public Featureset
{ {
filterT filter_; filterT filter_;
context_ptr ctx_;
shape_io shape_; shape_io shape_;
box2d<double> query_ext_; box2d<double> query_ext_;
boost::scoped_ptr<transcoder> tr_; boost::scoped_ptr<transcoder> tr_;
@ -51,6 +50,7 @@ class shape_featureset : public Featureset
std::vector<int> attr_ids_; std::vector<int> attr_ids_;
const int row_limit_; const int row_limit_;
mutable int count_; mutable int count_;
context_ptr ctx_;
public: public:
shape_featureset(filterT const& filter, shape_featureset(filterT const& filter,