diff --git a/include/mapnik/json/feature_grammar_x3_def.hpp b/include/mapnik/json/feature_grammar_x3_def.hpp index d2a4ad57f..1e18faeec 100644 --- a/include/mapnik/json/feature_grammar_x3_def.hpp +++ b/include/mapnik/json/feature_grammar_x3_def.hpp @@ -273,7 +273,7 @@ auto const feature_part_def = feature_type | (lit("\"properties\"") > lit(':') > lit('{') > -properties > lit('}')) | - omit[geojson_string] > lit(':') > omit[value] + (omit[geojson_string] > lit(':') > omit[value]) ; diff --git a/include/mapnik/json/unicode_string_grammar_x3_def.hpp b/include/mapnik/json/unicode_string_grammar_x3_def.hpp index 1e3d0094e..d58293cf3 100644 --- a/include/mapnik/json/unicode_string_grammar_x3_def.hpp +++ b/include/mapnik/json/unicode_string_grammar_x3_def.hpp @@ -95,11 +95,11 @@ x3::rule const escaped("Escaped Characted"); auto unicode_string_def = double_quoted ; auto const escaped_def = lit('\\') > - (lit('x') > hex[push_utf8] + ((lit('x') > hex[push_utf8]) | - lit('u') > hex4[push_utf8] + (lit('u') > hex4[push_utf8]) | - lit('U') > hex8[push_utf8] + (lit('U') > hex8[push_utf8]) | char_("0abtnvfre\"/\\N_LP \t")[push_esc] | diff --git a/src/json/extract_bounding_boxes_x3.cpp b/src/json/extract_bounding_boxes_x3.cpp index 7aadea8e5..a744c7eff 100644 --- a/src/json/extract_bounding_boxes_x3.cpp +++ b/src/json/extract_bounding_boxes_x3.cpp @@ -41,29 +41,29 @@ struct calculate_bounding_box box_.init(pt.x, pt.y); } - void operator()(mapnik::json::ring const& ring) const + void operator()(mapnik::json::ring const& r) const { - for (auto const& pt : ring) + for (auto const& pt : r) { if (!box_.valid()) box_.init(pt.x, pt.y); else box_.expand_to_include(pt.x, pt.y); } } - void operator()(mapnik::json::rings const& rings) const + void operator()(mapnik::json::rings const& rs) const { - for (auto const& ring : rings) + for (auto const& r : rs) { - operator()(ring); + operator()(r); break; // consider first ring only } } - void operator()(mapnik::json::rings_array const& rings_array) const + void operator()(mapnik::json::rings_array const& rings_ar) const { - for (auto const& rings : rings_array) + for (auto const& rs : rings_ar) { - operator()(rings); + operator()(rs); } } @@ -142,18 +142,19 @@ x3::rule const feature_collection = "Feature Coll auto const coordinates_rule_def = lit("\"coordinates\"") >> lit(':') >> positions_rule[extract_bounding_box]; -auto const bounding_box_def = raw[lit('{')[open_bracket] >> *(eps[check_brackets] >> - (lit("\"FeatureCollection\"") > eps(false) - | - lit('{')[open_bracket] - | - lit('}')[close_bracket] - | - coordinates_rule[assign_bbox] - | - omit[geojson_string] - | - omit[char_]))][assign_range]; +auto const bounding_box_def = raw[lit('{')[open_bracket] + >> *(eps[check_brackets] >> + ((lit("\"FeatureCollection\"") > eps(false)) + | + lit('{')[open_bracket] + | + lit('}')[close_bracket] + | + coordinates_rule[assign_bbox] + | + omit[geojson_string] + | + omit[char_]))][assign_range]; auto const feature = bounding_box[on_feature_callback];