From 2fa027855a8666535793ec7175d9c88a7dc67120 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 10 Jan 2011 23:04:34 +0000 Subject: [PATCH] don't return reference to temporary, and intialize metawriter values --- include/mapnik/symbolizer.hpp | 8 +++++++- src/symbolizer.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index 9121e3e92..dfd3afae1 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -39,6 +39,12 @@ class Map; class MAPNIK_DECL symbolizer_base { public: + symbolizer_base(): + properties_(), + properties_complete_(), + writer_name_(), + writer_ptr_() {} + /** Add a metawriter to this symbolizer. * * expression can be empty the default expression of @@ -83,7 +89,7 @@ public: void set_filename(path_expression_ptr filename); void set_transform(transform_type const& ); transform_type const& get_transform() const; - std::string const& get_transform_string() const; + std::string const get_transform_string() const; void set_opacity(float opacity); float get_opacity() const; protected: diff --git a/src/symbolizer.cpp b/src/symbolizer.cpp index 081685b80..c1b6f5d8b 100644 --- a/src/symbolizer.cpp +++ b/src/symbolizer.cpp @@ -94,7 +94,7 @@ transform_type const& symbolizer_with_image::get_transform() const return matrix_; } -std::string const& symbolizer_with_image::get_transform_string() const +std::string const symbolizer_with_image::get_transform_string() const { std::stringstream ss; ss << "matrix(" << matrix_[0] << ", " << matrix_[1] << ", "