From 3349cb58235f828ebca936a70de4820fb80bd8de Mon Sep 17 00:00:00 2001 From: Lucio Asnaghi Date: Tue, 16 Nov 2010 17:54:13 +0000 Subject: [PATCH] + avoid using static string as datasource name --- plugins/input/postgis/postgis.cpp | 10 ++++------ plugins/input/postgis/postgis.hpp | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/input/postgis/postgis.cpp b/plugins/input/postgis/postgis.cpp index 2b8eb5297..0bdc22a5b 100644 --- a/plugins/input/postgis/postgis.cpp +++ b/plugins/input/postgis/postgis.cpp @@ -322,22 +322,20 @@ void postgis_datasource::bind() const is_bound_ = true; } -std::string const postgis_datasource::name_="postgis"; - std::string postgis_datasource::name() { - return name_; + return "postgis"; } int postgis_datasource::type() const { - return type_; + return type_; } layer_descriptor postgis_datasource::get_descriptor() const { - if (!is_bound_) bind(); - return desc_; + if (!is_bound_) bind(); + return desc_; } diff --git a/plugins/input/postgis/postgis.hpp b/plugins/input/postgis/postgis.hpp index 67207a35e..2bed96143 100644 --- a/plugins/input/postgis/postgis.hpp +++ b/plugins/input/postgis/postgis.hpp @@ -70,7 +70,6 @@ class postgis_datasource : public datasource mutable layer_descriptor desc_; ConnectionCreator creator_; bool multiple_geometries_; - static const std::string name_; const std::string bbox_token_; const std::string scale_denom_token_; bool persist_connection_;