From f3c4f9eec7a804cb2caa4abc963640307ae75026 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 5 Mar 2012 13:48:35 -0800 Subject: [PATCH] initialize members of text_symbolizer_properties and char_properties - refs #1114 --- include/mapnik/text_properties.hpp | 2 +- src/text_properties.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/mapnik/text_properties.hpp b/include/mapnik/text_properties.hpp index 4362a632f..dbf21f8d7 100644 --- a/include/mapnik/text_properties.hpp +++ b/include/mapnik/text_properties.hpp @@ -56,7 +56,7 @@ struct char_properties /** Construct object from XML. */ void from_xml(boost::property_tree::ptree const &sym, fontset_map const & fontsets); /** Write object to XML ptree. */ - void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, char_properties const &dfl=char_properties()) const; + void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, char_properties const& dfl=char_properties()) const; std::string face_name; font_set fontset; float text_size; diff --git a/src/text_properties.cpp b/src/text_properties.cpp index 3fdfc600f..1ae028021 100644 --- a/src/text_properties.cpp +++ b/src/text_properties.cpp @@ -31,6 +31,7 @@ namespace mapnik using boost::optional; text_symbolizer_properties::text_symbolizer_properties() : + displacement(0,0), label_placement(POINT_PLACEMENT), halign(H_AUTO), jalign(J_MIDDLE), @@ -40,11 +41,13 @@ text_symbolizer_properties::text_symbolizer_properties() : avoid_edges(false), minimum_distance(0.0), minimum_padding(0.0), + minimum_path_length(0.0), max_char_angle_delta(22.5 * M_PI/180.0), force_odd_labels(false), allow_overlap(false), text_ratio(0), wrap_width(0), + format(), tree_() { @@ -218,6 +221,8 @@ void text_symbolizer_properties::set_old_style_expression(expression_ptr expr) } char_properties::char_properties() : + face_name(), + fontset(), text_size(10.0), character_spacing(0), line_spacing(0),