From 9e79e1edf13b2bd4fb6fa4b1a59328e4dfd7c414 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 17 Apr 2018 15:24:55 +0200 Subject: [PATCH] update const-ness in x3::context definitions to support boost 1_67 [skip-ci] --- .../mapnik/expression_grammar_x3_config.hpp | 2 +- .../json/extract_bounding_boxes_x3_config.hpp | 25 ++++++++----------- include/mapnik/json/json_grammar_config.hpp | 10 ++++---- include/mapnik/svg/svg_grammar_config_x3.hpp | 4 +-- src/css_color_grammar_x3.cpp | 5 +++- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/mapnik/expression_grammar_x3_config.hpp b/include/mapnik/expression_grammar_x3_config.hpp index ffd9f9a1d..8aba3d75b 100644 --- a/include/mapnik/expression_grammar_x3_config.hpp +++ b/include/mapnik/expression_grammar_x3_config.hpp @@ -35,7 +35,7 @@ using phrase_context_type = x3::phrase_parse_context::typ // define combined context using context_type = x3::context const, + std::reference_wrapper, phrase_context_type>; }} diff --git a/include/mapnik/json/extract_bounding_boxes_x3_config.hpp b/include/mapnik/json/extract_bounding_boxes_x3_config.hpp index 082e7b19a..54a2b17a4 100644 --- a/include/mapnik/json/extract_bounding_boxes_x3_config.hpp +++ b/include/mapnik/json/extract_bounding_boxes_x3_config.hpp @@ -84,30 +84,27 @@ using space_type = x3::standard::space_type; using phrase_parse_context_type = x3::phrase_parse_context::type; -using context_type = x3::context const, - phrase_parse_context_type>; - using extract_bounding_boxes_context_type = - x3::context const, - x3::context const, - context_type>>; + x3::context, + x3::context, + context_type>>; using extract_bounding_boxes_reverse_context_type = - x3::context const, - x3::context const, - x3::context const, + x3::context, + x3::context, + x3::context, phrase_parse_context_type>>>; using extract_bounding_boxes_context_type_f = - x3::context const, - x3::context const, + x3::context, + x3::context, context_type>>; using extract_bounding_boxes_reverse_context_type_f = - x3::context const, - x3::context const, - x3::context const, + x3::context, + x3::context, + x3::context, phrase_parse_context_type>>>; }}} diff --git a/include/mapnik/json/json_grammar_config.hpp b/include/mapnik/json/json_grammar_config.hpp index 854a50b21..e17b4773d 100644 --- a/include/mapnik/json/json_grammar_config.hpp +++ b/include/mapnik/json/json_grammar_config.hpp @@ -92,20 +92,20 @@ using iterator_type = char const*; using phrase_parse_context_type = x3::phrase_parse_context::type; using context_type = x3::context const, + std::reference_wrapper, phrase_parse_context_type>; using feature_context_type = x3::context const, + std::reference_wrapper, x3::context const, + std::reference_wrapper, phrase_parse_context_type>>; // our spirit x3 grammars needs this one with changed order of feature_impl and transcoder (??) using feature_context_const_type = x3::context const, + std::reference_wrapper, x3::context const, + std::reference_wrapper, phrase_parse_context_type>>; // helper macro diff --git a/include/mapnik/svg/svg_grammar_config_x3.hpp b/include/mapnik/svg/svg_grammar_config_x3.hpp index db1c7eb8d..63cbf79e1 100644 --- a/include/mapnik/svg/svg_grammar_config_x3.hpp +++ b/include/mapnik/svg/svg_grammar_config_x3.hpp @@ -40,8 +40,8 @@ using space_type = x3::standard::space_type; using iterator_type = char const*; using phrase_parse_context_type = x3::phrase_parse_context::type; -using svg_parse_context_type = x3::context const, - x3::context const, +using svg_parse_context_type = x3::context, + x3::context, phrase_parse_context_type>>; inline double deg2rad(double deg) {return (M_PI * deg) / 180.0;} diff --git a/src/css_color_grammar_x3.cpp b/src/css_color_grammar_x3.cpp index 372f0dff0..5a7a6ed2c 100644 --- a/src/css_color_grammar_x3.cpp +++ b/src/css_color_grammar_x3.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ #include - +#include namespace mapnik { namespace css_color_grammar { namespace x3 = boost::spirit::x3; @@ -30,4 +30,7 @@ using context_type = x3::phrase_parse_context::type; BOOST_SPIRIT_INSTANTIATE(css_color_grammar_type, iterator_type, context_type); +template bool parse_rule +(css_color_grammar_type, iterator_type&, iterator_type const&, context_type const&, mapnik::filter::color_to_alpha&); + }}