From 50069cb094de484e9e269de55551ec7c860f7af8 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 12 Feb 2013 19:53:16 +0000 Subject: [PATCH 1/3] + avoid unnecessary const_cast<> --- src/feature_type_style.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/feature_type_style.cpp b/src/feature_type_style.cpp index 58930e0e8..9858d8b47 100644 --- a/src/feature_type_style.cpp +++ b/src/feature_type_style.cpp @@ -68,7 +68,7 @@ feature_type_style::feature_type_style(feature_type_style const& rhs, bool deep_ feature_type_style& feature_type_style::operator=(feature_type_style const& rhs) { if (this == &rhs) return *this; - rules_=rhs.rules_; + rules_=rhs.rules_; filters_ = rhs.filters_; direct_filters_ = rhs.direct_filters_; comp_op_ = rhs.comp_op_; @@ -161,21 +161,21 @@ void feature_type_style::update_rule_cache(double scale_denom) else_rules_.clear(); also_rules_.clear(); - BOOST_FOREACH(rule const& r, rules_) + BOOST_FOREACH(rule & r, rules_) { if (r.active(scale_denom)) { if (r.has_else_filter()) { - else_rules_.push_back(const_cast(&r)); + else_rules_.push_back(&r); } else if (r.has_also_filter()) { - also_rules_.push_back(const_cast(&r)); + also_rules_.push_back(&r); } else { - if_rules_.push_back(const_cast(&r)); + if_rules_.push_back(&r); } } } From 987e6b1262c38de8a0eba626a84d3f2003489c2e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 13 Feb 2013 16:38:56 -0800 Subject: [PATCH 2/3] fix unsigned/signed comparison gcc warnings --- benchmark/run.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/run.cpp b/benchmark/run.cpp index 4bc35d6ad..b1b3a8dde 100644 --- a/benchmark/run.cpp +++ b/benchmark/run.cpp @@ -356,7 +356,7 @@ struct test7 } void operator()() { - for (int i=0;i expr_grammar(transcoder("utf-8")); - for (int i=0;i Date: Mon, 18 Feb 2013 17:01:38 +0000 Subject: [PATCH 3/3] + add polgon close converter --- include/mapnik/vertex_converters.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/mapnik/vertex_converters.hpp b/include/mapnik/vertex_converters.hpp index cc41f7e91..1570cba80 100644 --- a/include/mapnik/vertex_converters.hpp +++ b/include/mapnik/vertex_converters.hpp @@ -55,6 +55,7 @@ // agg #include "agg_conv_clip_polygon.h" #include "agg_conv_clip_polyline.h" +#include "agg_conv_close_polygon.h" #include "agg_conv_smooth_poly1.h" #include "agg_conv_stroke.h" #include "agg_conv_dash.h" @@ -66,6 +67,7 @@ namespace mapnik { struct transform_tag {}; struct clip_line_tag {}; struct clip_poly_tag {}; +struct close_poly_tag {}; struct smooth_tag {}; struct simplify_tag {}; struct stroke_tag {}; @@ -177,7 +179,6 @@ struct converter_traits { typedef T geometry_type; typedef typename agg::conv_clip_polygon conv_type; - template static void setup(geometry_type & geom, Args const& args) { @@ -186,6 +187,17 @@ struct converter_traits } }; +template +struct converter_traits +{ + typedef T geometry_type; + typedef typename agg::conv_close_polygon conv_type; + template + static void setup(geometry_type & geom, Args const& args) + { + // + } +}; template struct converter_traits