explicitly initialize all members of layer class in ctor

This commit is contained in:
Dane Springmeyer 2014-10-01 13:53:12 -07:00
parent 9ecdc839b5
commit ed3bc1d411

View file

@ -30,6 +30,7 @@
namespace mapnik namespace mapnik
{ {
layer::layer(std::string const& name, std::string const& srs) layer::layer(std::string const& name, std::string const& srs)
: name_(name), : name_(name),
srs_(srs), srs_(srs),
@ -39,8 +40,11 @@ layer::layer(std::string const& name, std::string const& srs)
queryable_(false), queryable_(false),
clear_label_cache_(false), clear_label_cache_(false),
cache_features_(false), cache_features_(false),
group_by_(""), group_by_(),
ds_() {} styles_(),
ds_(),
buffer_size_(0) {
}
layer::layer(layer const& rhs) layer::layer(layer const& rhs)
: name_(rhs.name_), : name_(rhs.name_),
@ -230,7 +234,6 @@ void layer::reset_buffer_size()
buffer_size_.reset(); buffer_size_.reset();
} }
box2d<double> layer::envelope() const box2d<double> layer::envelope() const
{ {
if (ds_) return ds_->envelope(); if (ds_) return ds_->envelope();