+ avoid usage of static string where it's not needed

This commit is contained in:
Lucio Asnaghi 2010-11-14 14:55:21 +00:00
parent 68cbb51814
commit 0d895b1e59
2 changed files with 5 additions and 4 deletions

View file

@ -42,8 +42,6 @@ using mapnik::filter_in_box;
using mapnik::filter_at_point; using mapnik::filter_at_point;
using mapnik::attribute_descriptor; using mapnik::attribute_descriptor;
const std::string osm_datasource::name_ = "osm";
osm_datasource::osm_datasource(const parameters &params, bool bind) osm_datasource::osm_datasource(const parameters &params, bool bind)
: datasource (params), : datasource (params),
type_(datasource::Vector), type_(datasource::Vector),
@ -122,6 +120,10 @@ osm_datasource::~osm_datasource()
//delete osm_data_; //delete osm_data_;
} }
std::string osm_datasource::name()
{
return "osm";
}
int osm_datasource::type() const int osm_datasource::type() const
{ {

View file

@ -51,7 +51,7 @@ class osm_datasource : public datasource
featureset_ptr features_at_point(coord2d const& pt) const; featureset_ptr features_at_point(coord2d const& pt) const;
box2d<double> envelope() const; box2d<double> envelope() const;
layer_descriptor get_descriptor() const; layer_descriptor get_descriptor() const;
static std::string name() { return name_; } static std::string name();
void bind() const; void bind() const;
private: private:
osm_datasource(const osm_datasource&); osm_datasource(const osm_datasource&);
@ -61,7 +61,6 @@ class osm_datasource : public datasource
mutable osm_dataset * osm_data_; mutable osm_dataset * osm_data_;
int type_; int type_;
mutable layer_descriptor desc_; mutable layer_descriptor desc_;
static const std::string name_;
}; };
#endif //OSM_DATASOURCE_HPP #endif //OSM_DATASOURCE_HPP