diff --git a/bindings/python/mapnik_symbolizer.cpp b/bindings/python/mapnik_symbolizer.cpp index 1b80bb03f..814d65fb0 100644 --- a/bindings/python/mapnik_symbolizer.cpp +++ b/bindings/python/mapnik_symbolizer.cpp @@ -131,7 +131,7 @@ boost::python::object __getitem__(mapnik::symbolizer_base const& sym, std::strin std::string __str__(mapnik::symbolizer const& sym) { - return boost::apply_visitor(mapnik::symbolizer_to_json(), sym); + return mapnik::util::apply_visitor(mapnik::symbolizer_to_json(), sym); } std::string get_symbolizer_type(symbolizer const& sym) @@ -141,7 +141,7 @@ std::string get_symbolizer_type(symbolizer const& sym) std::size_t hash_impl(symbolizer const& sym) { - return boost::apply_visitor(mapnik::symbolizer_hash_visitor(), sym); + return mapnik::util::apply_visitor(mapnik::symbolizer_hash_visitor(), sym); } template @@ -150,7 +150,7 @@ std::size_t hash_impl_2(T const& sym) return mapnik::symbolizer_hash::value(sym); } -struct extract_underlying_type_visitor : boost::static_visitor +struct extract_underlying_type_visitor : mapnik::util::static_visitor { template boost::python::object operator() (T const& sym) const @@ -161,7 +161,7 @@ struct extract_underlying_type_visitor : boost::static_visitor > f_attr_; }; -struct symbolizer_attributes : public boost::static_visitor<> +struct symbolizer_attributes : public util::static_visitor<> { symbolizer_attributes(std::set& names, double & filter_factor) @@ -210,7 +210,7 @@ private: class attribute_collector : public mapnik::noncopyable { private: - std::set& names_; + std::set & names_; double filter_factor_; expression_attributes > f_attr; public: @@ -224,9 +224,9 @@ public: { typename RuleType::symbolizers const& symbols = r.get_symbolizers(); symbolizer_attributes s_attr(names_,filter_factor_); - for (auto symbol : symbols) + for (auto const& sym : symbols) { - boost::apply_visitor(s_attr,symbol); + util::apply_visitor(std::ref(s_attr), sym); } expression_ptr const& expr = r.get_filter(); @@ -256,12 +256,13 @@ inline void group_attribute_collector::operator() (group_symbolizer const& sym) // get columns from child rules and symbolizers group_symbolizer_properties_ptr props = get(sym, keys::group_properties); - if (props) { + if (props) + { for (auto const& rule : props->get_rules()) { // note that this recurses down on to the symbolizer // internals too, so we get all free variables. - column_collector(*rule); +// FIXME column_collector(*rule); // still need to collect repeat key columns if (rule->get_repeat_key()) { diff --git a/include/mapnik/feature_style_processor_impl.hpp b/include/mapnik/feature_style_processor_impl.hpp index b67f3de97..ee7ac46d3 100644 --- a/include/mapnik/feature_style_processor_impl.hpp +++ b/include/mapnik/feature_style_processor_impl.hpp @@ -44,10 +44,10 @@ #include #include #include - +#include // boost #include -#include +//#include // stl #include @@ -87,7 +87,7 @@ struct process_impl * \param sym Symbolizer object */ template -struct feature_style_processor::symbol_dispatch : public boost::static_visitor<> +struct feature_style_processor::symbol_dispatch : public util::static_visitor<> { symbol_dispatch (Processor & output, mapnik::feature_impl & f, @@ -665,7 +665,7 @@ void feature_style_processor::render_style( { for (symbolizer const& sym : symbols) { - boost::apply_visitor(symbol_dispatch(p,*feature,prj_trans),sym); + util::apply_visitor(symbol_dispatch(p,*feature,prj_trans),sym); } } if (style->get_filter_mode() == FILTER_FIRST) @@ -686,7 +686,7 @@ void feature_style_processor::render_style( { for (symbolizer const& sym : symbols) { - boost::apply_visitor(symbol_dispatch(p,*feature,prj_trans),sym); + util::apply_visitor(symbol_dispatch(p,*feature,prj_trans),sym); } } } @@ -701,7 +701,7 @@ void feature_style_processor::render_style( { for (symbolizer const& sym : symbols) { - boost::apply_visitor(symbol_dispatch(p,*feature,prj_trans),sym); + util::apply_visitor(symbol_dispatch(p,*feature,prj_trans),sym); } } } diff --git a/include/mapnik/renderer_common/process_group_symbolizer.hpp b/include/mapnik/renderer_common/process_group_symbolizer.hpp index db8c3de4a..878cb1846 100644 --- a/include/mapnik/renderer_common/process_group_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_group_symbolizer.hpp @@ -109,7 +109,7 @@ using render_thunk_list = std::list; // The bounding boxes can be used for layout, and the thunks are // used to re-render at locations according to the group layout. -struct render_thunk_extractor : public boost::static_visitor<> +struct render_thunk_extractor : public util::static_visitor<> { render_thunk_extractor(box2d & box, render_thunk_list & thunks, @@ -280,7 +280,7 @@ void render_group_symbolizer(group_symbolizer const& sym, for (auto const& sym : *rule) { // TODO: construct layout and obtain bounding box - boost::apply_visitor(extractor, sym); + util::apply_visitor(extractor, sym); } // add the bounding box to the layout manager diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index 666d8bbf8..8e0f63acb 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -536,18 +536,18 @@ struct MAPNIK_DECL group_symbolizer : public symbolizer_base {}; struct MAPNIK_DECL debug_symbolizer : public symbolizer_base {}; // symbolizer -using symbolizer = boost::variant; +using symbolizer = util::variant; using dash_array = std::vector >; diff --git a/include/mapnik/symbolizer_hash.hpp b/include/mapnik/symbolizer_hash.hpp index 0d2718099..1a85fca65 100644 --- a/include/mapnik/symbolizer_hash.hpp +++ b/include/mapnik/symbolizer_hash.hpp @@ -77,7 +77,7 @@ struct symbolizer_hash } }; -struct symbolizer_hash_visitor : boost::static_visitor +struct symbolizer_hash_visitor : util::static_visitor { template std::size_t operator() (Symbolizer const& sym) const diff --git a/include/mapnik/symbolizer_utils.hpp b/include/mapnik/symbolizer_utils.hpp index 7a43bf1f9..ae7ae481e 100644 --- a/include/mapnik/symbolizer_utils.hpp +++ b/include/mapnik/symbolizer_utils.hpp @@ -39,7 +39,7 @@ #include #include // boost -#include +//#include namespace mapnik { @@ -124,7 +124,7 @@ struct symbolizer_traits // symbolizer name impl namespace detail { -struct symbolizer_name_impl : public boost::static_visitor +struct symbolizer_name_impl : public util::static_visitor { public: template @@ -137,7 +137,7 @@ public: inline std::string symbolizer_name(symbolizer const& sym) { - std::string type = boost::apply_visitor( detail::symbolizer_name_impl(), sym); + std::string type = util::apply_visitor( detail::symbolizer_name_impl(), sym); return type; } @@ -230,7 +230,7 @@ private: Meta const& meta_; }; -struct symbolizer_to_json : public boost::static_visitor +struct symbolizer_to_json : public util::static_visitor { using result_type = std::string; diff --git a/src/svg/output/process_symbolizers.cpp b/src/svg/output/process_symbolizers.cpp index f6baaeabe..637f9d559 100644 --- a/src/svg/output/process_symbolizers.cpp +++ b/src/svg/output/process_symbolizers.cpp @@ -32,7 +32,7 @@ namespace mapnik { -struct symbol_type_dispatch : public boost::static_visitor +struct symbol_type_dispatch : public util::static_visitor { template bool operator()(Symbolizer const& sym) const @@ -51,7 +51,7 @@ struct symbol_type_dispatch : public boost::static_visitor bool is_path_based(symbolizer const& sym) { - return boost::apply_visitor(symbol_type_dispatch(), sym); + return util::apply_visitor(symbol_type_dispatch(), sym); } template @@ -86,7 +86,7 @@ bool svg_renderer::process(rule::symbolizers const& syms, { process_path = true; } - boost::apply_visitor(symbol_dispatch(*this, feature, prj_trans), sym); + util::apply_visitor(symbol_dispatch(*this, feature, prj_trans), sym); } if (process_path)