topojson_grammar - don't allocate generic_json structure holding boost::spirit::qi rules on stack (ref #3361)

This commit is contained in:
artemp 2016-03-15 17:19:16 +01:00
parent 29f19fe6bc
commit b164e010fd
2 changed files with 2 additions and 2 deletions

View file

@ -48,6 +48,8 @@ struct topojson_grammar : qi::grammar<Iterator, space_type, topology()>
{
topojson_grammar();
private:
// generic JSON support
json::generic_json<Iterator> json;
// topoJSON
qi::rule<Iterator, space_type, mapnik::topojson::topology()> topology;
qi::rule<Iterator, space_type, std::vector<mapnik::topojson::geometry>()> objects;

View file

@ -129,8 +129,6 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
// error handler
boost::phoenix::function<ErrorHandler> const error_handler;
// generic JSON support
json::generic_json<Iterator> json;
// generic JSON types
json.value = json.object | json.array | json.string_ | json.number
;