diff --git a/include/mapnik/json/feature_grammar_x3_def.hpp b/include/mapnik/json/feature_grammar_x3_def.hpp index d6432c5d6..7769a20ff 100644 --- a/include/mapnik/json/feature_grammar_x3_def.hpp +++ b/include/mapnik/json/feature_grammar_x3_def.hpp @@ -164,15 +164,6 @@ struct geometry_type_ : x3::symbols } } geometry_type_symbols; -auto assign_name = [](auto const& ctx) -{ - std::get<0>(_val(ctx)) = std::move(_attr(ctx)); -}; -auto assign_value = [](auto const& ctx) -{ - std::get<1>(_val(ctx)) = std::move(_attr(ctx)); -}; - auto const assign_geometry_type = [] (auto const& ctx) { std::get<0>(_val(ctx)) = _attr(ctx); @@ -263,7 +254,7 @@ auto const geometry_tuple_def = (geometry_type[assign_geometry_type] (omit[geojson_string] > lit(':') > omit[value])) % lit(','); -auto const property_def = geojson_string[assign_name] > lit(':') > value[assign_value]; +auto const property_def = geojson_string[assign_key] > lit(':') > value[assign_value]; auto const properties_def = property[assign_property] % lit(','); diff --git a/include/mapnik/json/generic_json_grammar_x3.hpp b/include/mapnik/json/generic_json_grammar_x3.hpp index 802db8459..27cd92c44 100644 --- a/include/mapnik/json/generic_json_grammar_x3.hpp +++ b/include/mapnik/json/generic_json_grammar_x3.hpp @@ -43,6 +43,21 @@ BOOST_SPIRIT_DECLARE(generic_json_grammar_type); BOOST_SPIRIT_DECLARE(generic_json_key_value_type); } +auto assign = [](auto const& ctx) +{ + _val(ctx) = _attr(ctx); +}; + +auto assign_key = [](auto const& ctx) +{ + std::get<0>(_val(ctx)) = _attr(ctx); +}; + +auto assign_value = [](auto const& ctx) +{ + std::get<1>(_val(ctx)) = std::move(_attr(ctx)); +}; + grammar::generic_json_grammar_type const& generic_json_grammar(); grammar::generic_json_key_value_type const& generic_json_key_value(); diff --git a/include/mapnik/json/generic_json_grammar_x3_def.hpp b/include/mapnik/json/generic_json_grammar_x3_def.hpp index 8c30cb37d..f15334642 100644 --- a/include/mapnik/json/generic_json_grammar_x3_def.hpp +++ b/include/mapnik/json/generic_json_grammar_x3_def.hpp @@ -46,22 +46,6 @@ auto make_false = [] (auto const& ctx) _val(ctx) = false; }; -auto assign = [](auto const& ctx) -{ - _val(ctx) = _attr(ctx); -}; - -auto assign_key = [](auto const& ctx) -{ - std::get<0>(_val(ctx)) = _attr(ctx); -}; - -auto assign_value = [](auto const& ctx) -{ - std::get<1>(_val(ctx)) = _attr(ctx); -}; - - using x3::lit; using x3::string; // exported rules