Merge branch 'master' of github.com:mapnik/mapnik
This commit is contained in:
commit
b958d2d1d4
3 changed files with 13 additions and 10 deletions
|
@ -29,13 +29,11 @@
|
||||||
|
|
||||||
// spirit::qi
|
// spirit::qi
|
||||||
#include <boost/spirit/include/qi.hpp>
|
#include <boost/spirit/include/qi.hpp>
|
||||||
#include <boost/spirit/include/phoenix.hpp>
|
#include <boost/spirit/include/phoenix_function.hpp>
|
||||||
|
|
||||||
namespace mapnik { namespace json {
|
namespace mapnik { namespace json {
|
||||||
|
|
||||||
namespace qi = boost::spirit::qi;
|
namespace qi = boost::spirit::qi;
|
||||||
namespace phoenix = boost::phoenix;
|
|
||||||
namespace fusion = boost::fusion;
|
|
||||||
namespace standard_wide = boost::spirit::standard_wide;
|
namespace standard_wide = boost::spirit::standard_wide;
|
||||||
using standard_wide::space_type;
|
using standard_wide::space_type;
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ void cairo_renderer_base::process(building_symbolizer const& sym,
|
||||||
frame->line_to(x,y);
|
frame->line_to(x,y);
|
||||||
face_segments.push_back(segment_t(x0,y0,x,y));
|
face_segments.push_back(segment_t(x0,y0,x,y));
|
||||||
}
|
}
|
||||||
else if (cm = SEG_CLOSE)
|
else if (cm == SEG_CLOSE)
|
||||||
{
|
{
|
||||||
frame->close_path();
|
frame->close_path();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,11 @@
|
||||||
|
|
||||||
// boost
|
// boost
|
||||||
#include <boost/spirit/include/support_multi_pass.hpp>
|
#include <boost/spirit/include/support_multi_pass.hpp>
|
||||||
|
#include <boost/spirit/include/phoenix_object.hpp>
|
||||||
|
#include <boost/spirit/include/phoenix_stl.hpp>
|
||||||
|
#include <boost/spirit/include/phoenix_operator.hpp>
|
||||||
|
#include <iostream> // for clog, endl, etc
|
||||||
|
#include <string> // for string
|
||||||
|
|
||||||
namespace mapnik { namespace json {
|
namespace mapnik { namespace json {
|
||||||
|
|
||||||
|
@ -52,9 +57,9 @@ geometry_grammar<Iterator>::geometry_grammar()
|
||||||
using qi::_pass;
|
using qi::_pass;
|
||||||
using qi::fail;
|
using qi::fail;
|
||||||
using qi::on_error;
|
using qi::on_error;
|
||||||
using phoenix::new_;
|
using boost::phoenix::new_;
|
||||||
using phoenix::push_back;
|
using boost::phoenix::push_back;
|
||||||
using phoenix::construct;
|
using boost::phoenix::construct;
|
||||||
// Nabialek trick - FIXME: how to bind argument to dispatch rule?
|
// Nabialek trick - FIXME: how to bind argument to dispatch rule?
|
||||||
// geometry = lit("\"geometry\"")
|
// geometry = lit("\"geometry\"")
|
||||||
// >> lit(':') >> lit('{')
|
// >> lit(':') >> lit('{')
|
||||||
|
@ -144,11 +149,11 @@ geometry_grammar<Iterator>::geometry_grammar()
|
||||||
(
|
(
|
||||||
geometry
|
geometry
|
||||||
, std::clog
|
, std::clog
|
||||||
<< phoenix::val("Error! Expecting ")
|
<< boost::phoenix::val("Error! Expecting ")
|
||||||
<< _4 // what failed?
|
<< _4 // what failed?
|
||||||
<< phoenix::val(" here: \"")
|
<< boost::phoenix::val(" here: \"")
|
||||||
<< construct<std::string>(_3, _2) // iterators to error-pos, end
|
<< construct<std::string>(_3, _2) // iterators to error-pos, end
|
||||||
<< phoenix::val("\"")
|
<< boost::phoenix::val("\"")
|
||||||
<< std::endl
|
<< std::endl
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue