diff --git a/src/symbolizer_helpers.cpp b/src/symbolizer_helpers.cpp index 117c502d0..8a646fca9 100644 --- a/src/symbolizer_helpers.cpp +++ b/src/symbolizer_helpers.cpp @@ -366,7 +366,6 @@ pixel_position shield_symbolizer_helper::get_marker_pos marker_ext_.re_center(lx, ly); //label is added to detector by get_line_placement(), but marker isn't detector_.insert(marker_ext_); - if (writer_.first) writer_.first->add_box(marker_ext_, feature_, t_, writer_.second); return pixel_position(px, py); } else { diff --git a/src/text_placements/dummy.cpp b/src/text_placements/dummy.cpp index cf2d43f15..3c66b1f14 100644 --- a/src/text_placements/dummy.cpp +++ b/src/text_placements/dummy.cpp @@ -19,7 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ + #include +#include + namespace mapnik { bool text_placement_info_dummy::next() @@ -32,7 +35,7 @@ bool text_placement_info_dummy::next() text_placement_info_ptr text_placements_dummy::get_placement_info( double scale_factor, dimension_type dim, bool has_dimensions) const { - return text_placement_info_ptr(new text_placement_info_dummy( + return text_placement_info_ptr(boost::make_shared( this, scale_factor, dim, has_dimensions)); } diff --git a/src/text_placements/list.cpp b/src/text_placements/list.cpp index 9d93fda94..80762baea 100644 --- a/src/text_placements/list.cpp +++ b/src/text_placements/list.cpp @@ -19,7 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ + #include +#include + namespace mapnik { @@ -56,7 +59,7 @@ text_symbolizer_properties & text_placements_list::get(unsigned i) text_placement_info_ptr text_placements_list::get_placement_info( double scale_factor, dimension_type dim, bool has_dimensions) const { - return text_placement_info_ptr(new text_placement_info_list(this, + return text_placement_info_ptr(boost::make_shared(this, scale_factor, dim, has_dimensions)); } @@ -89,7 +92,8 @@ text_placements_ptr text_placements_list::from_xml(boost::property_tree::ptree c list->defaults.from_xml(xml, fontsets); ptree::const_iterator itr = xml.begin(); ptree::const_iterator end = xml.end(); - for( ;itr != end; ++itr) { + for( ;itr != end; ++itr) + { if ((itr->first.find('<') != std::string::npos) || (itr->first != "Placement")) continue; //TODO: ensure_attrs(symIter->second, "TextSymbolizer/Placement", s_common.str()); text_symbolizer_properties &p = list->add(); diff --git a/src/text_placements/simple.cpp b/src/text_placements/simple.cpp index 81af87195..49151066f 100644 --- a/src/text_placements/simple.cpp +++ b/src/text_placements/simple.cpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace mapnik { @@ -101,7 +102,7 @@ bool text_placement_info_simple::next_position_only() text_placement_info_ptr text_placements_simple::get_placement_info( double scale_factor, dimension_type dim, bool has_dimensions) const { - return text_placement_info_ptr(new text_placement_info_simple(this, + return text_placement_info_ptr(boost::make_shared(this, scale_factor, dim, has_dimensions)); } @@ -147,7 +148,7 @@ void text_placements_simple::set_positions(std::string positions) std::cerr << "WARNING: Could not parse text_placement_simple placement string ('" << positions << "').\n"; } if (direction_.size() == 0) { - std::cerr << "WARNING: text_placements_simple with no valid placments! ('"<< positions<<"')\n"; + std::cerr << "WARNING: text_placements_simple with no valid placements! ('"<< positions<<"')\n"; } } @@ -168,7 +169,7 @@ std::string text_placements_simple::get_positions() text_placements_ptr text_placements_simple::from_xml(boost::property_tree::ptree const &xml, fontset_map const & fontsets) { - text_placements_ptr ptr = text_placements_ptr(new text_placements_simple( + text_placements_ptr ptr = text_placements_ptr(boost::make_shared( get_attr(xml, "placements", "X"))); ptr->defaults.from_xml(xml, fontsets); return ptr;