minimum boost version is 1.47 - remove obsolete code handling older versions
This commit is contained in:
parent
1c16b3797d
commit
84166882d9
37 changed files with 105 additions and 812 deletions
|
@ -47,15 +47,8 @@ public:
|
|||
{
|
||||
init();
|
||||
}
|
||||
#if BOOST_VERSION >= 103500
|
||||
enumeration_(const char * python_alias, const char * doc) :
|
||||
base_type( python_alias, doc )
|
||||
#else
|
||||
enumeration_(const char * python_alias, const char * /*doc*/) :
|
||||
// Boost.Python < 1.35.0 doesn't support
|
||||
// docstrings for enums so we ignore it.
|
||||
base_type( python_alias )
|
||||
#endif
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -38,11 +38,9 @@
|
|||
#include <mapnik/json/geojson_generator.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 104700
|
||||
#include <mapnik/util/geometry_to_wkb.hpp>
|
||||
#include <mapnik/util/geometry_to_wkt.hpp>
|
||||
#include <mapnik/util/geometry_to_svg.hpp>
|
||||
#endif
|
||||
|
||||
// stl
|
||||
#include <stdexcept>
|
||||
|
@ -132,7 +130,6 @@ inline std::string boost_version()
|
|||
return s.str();
|
||||
}
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_order)
|
||||
{
|
||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,byte_order);
|
||||
|
@ -151,16 +148,7 @@ PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_ord
|
|||
Py_RETURN_NONE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
PyObject* to_wkb( geometry_type const& geom)
|
||||
{
|
||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
|
||||
{
|
||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(p,byte_order);
|
||||
|
@ -179,18 +167,9 @@ PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
|
|||
Py_RETURN_NONE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
PyObject* to_wkb2( path_type const& p)
|
||||
{
|
||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::string to_wkt( geometry_type const& geom)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
std::string wkt; // Use Python String directly ?
|
||||
bool result = mapnik::util::to_wkt(wkt,geom);
|
||||
if (!result)
|
||||
|
@ -198,15 +177,10 @@ std::string to_wkt( geometry_type const& geom)
|
|||
throw std::runtime_error("Generate WKT failed");
|
||||
}
|
||||
return wkt;
|
||||
#else
|
||||
throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string to_wkt2( path_type const& geom)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
std::string wkt; // Use Python String directly ?
|
||||
bool result = mapnik::util::to_wkt(wkt,geom);
|
||||
if (!result)
|
||||
|
@ -214,10 +188,6 @@ std::string to_wkt2( path_type const& geom)
|
|||
throw std::runtime_error("Generate WKT failed");
|
||||
}
|
||||
return wkt;
|
||||
#else
|
||||
throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string to_geojson( path_type const& geom)
|
||||
|
@ -233,8 +203,6 @@ std::string to_geojson( path_type const& geom)
|
|||
|
||||
std::string to_svg( geometry_type const& geom)
|
||||
{
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
std::string svg; // Use Python String directly ?
|
||||
bool result = mapnik::util::to_svg(svg,geom);
|
||||
if (!result)
|
||||
|
@ -242,17 +210,12 @@ std::string to_svg( geometry_type const& geom)
|
|||
throw std::runtime_error("Generate SVG failed");
|
||||
}
|
||||
return svg;
|
||||
#else
|
||||
throw std::runtime_error("mapnik::to_svg() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
// https://github.com/mapnik/mapnik/issues/1437
|
||||
std::string to_svg2( path_type const& geom)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
std::string svg; // Use Python String directly ?
|
||||
bool result = mapnik::util::to_svg(svg,geom);
|
||||
if (!result)
|
||||
|
@ -260,10 +223,6 @@ std::string to_svg2( path_type const& geom)
|
|||
throw std::runtime_error("Generate WKT failed");
|
||||
}
|
||||
return svg;
|
||||
#else
|
||||
throw std::runtime_error("mapnik::to_svg() requires at least boost 1.47 while your build was compiled against boost "
|
||||
+ boost_version());
|
||||
#endif
|
||||
}*/
|
||||
|
||||
|
||||
|
@ -277,12 +236,10 @@ void export_geometry()
|
|||
.value("Polygon",mapnik::geometry_type::types::Polygon)
|
||||
;
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
enum_<mapnik::util::wkbByteOrder>("wkbByteOrder")
|
||||
.value("XDR",mapnik::util::wkbXDR)
|
||||
.value("NDR",mapnik::util::wkbNDR)
|
||||
;
|
||||
#endif
|
||||
|
||||
using mapnik::geometry_type;
|
||||
class_<geometry_type, std::shared_ptr<geometry_type>, boost::noncopyable>("Geometry2d",no_init)
|
||||
|
|
|
@ -40,10 +40,6 @@
|
|||
// stl
|
||||
#include <string>
|
||||
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 104500
|
||||
// fusion
|
||||
#include <boost/fusion/include/adapt_adt.hpp>
|
||||
|
||||
|
@ -128,9 +124,13 @@ struct hsl_conv_impl
|
|||
l /= 100.0;
|
||||
|
||||
if (l <= 0.5)
|
||||
{
|
||||
m2 = l * (s + 1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m2 = l + s - l*s;
|
||||
}
|
||||
m1 = l * 2 - m2;
|
||||
|
||||
double r = hue_to_rgb(m1, m2, h + 1.0/3.0);
|
||||
|
@ -165,357 +165,4 @@ struct css_color_grammar : qi::grammar<Iterator, color(), ascii_space_type>
|
|||
|
||||
}
|
||||
|
||||
#else // boost 1.42 compatibility
|
||||
|
||||
#include <boost/fusion/include/adapt_struct.hpp>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
// temp workaround . TODO: adapt mapnik::color
|
||||
struct css
|
||||
{
|
||||
css ()
|
||||
: r(255),g(255),b(255),a(255) {}
|
||||
css(unsigned r_,unsigned g_, unsigned b_,unsigned a_ = 0xff)
|
||||
: r(r_),g(g_),b(b_),a(a_) {}
|
||||
|
||||
unsigned r;
|
||||
unsigned g;
|
||||
unsigned b;
|
||||
unsigned a;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
mapnik::css,
|
||||
(unsigned, r)
|
||||
(unsigned, g)
|
||||
(unsigned, b)
|
||||
(unsigned, a)
|
||||
)
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
namespace qi = boost::spirit::qi;
|
||||
namespace ascii = boost::spirit::ascii;
|
||||
namespace phoenix = boost::phoenix;
|
||||
|
||||
typedef boost::spirit::ascii::space_type ascii_space_type;
|
||||
|
||||
struct named_colors_ : qi::symbols<char,css>
|
||||
{
|
||||
named_colors_()
|
||||
{
|
||||
add
|
||||
("aliceblue", css(240, 248, 255))
|
||||
("antiquewhite", css(250, 235, 215))
|
||||
("aqua", css(0, 255, 255))
|
||||
("aquamarine", css(127, 255, 212))
|
||||
("azure", css(240, 255, 255))
|
||||
("beige", css(245, 245, 220))
|
||||
("bisque", css(255, 228, 196))
|
||||
("black", css(0, 0, 0))
|
||||
("blanchedalmond", css(255,235,205))
|
||||
("blue", css(0, 0, 255))
|
||||
("blueviolet", css(138, 43, 226))
|
||||
("brown", css(165, 42, 42))
|
||||
("burlywood", css(222, 184, 135))
|
||||
("cadetblue", css(95, 158, 160))
|
||||
("chartreuse", css(127, 255, 0))
|
||||
("chocolate", css(210, 105, 30))
|
||||
("coral", css(255, 127, 80))
|
||||
("cornflowerblue", css(100, 149, 237))
|
||||
("cornsilk", css(255, 248, 220))
|
||||
("crimson", css(220, 20, 60))
|
||||
("cyan", css(0, 255, 255))
|
||||
("darkblue", css(0, 0, 139))
|
||||
("darkcyan", css(0, 139, 139))
|
||||
("darkgoldenrod", css(184, 134, 11))
|
||||
("darkgray", css(169, 169, 169))
|
||||
("darkgreen", css(0, 100, 0))
|
||||
("darkgrey", css(169, 169, 169))
|
||||
("darkkhaki", css(189, 183, 107))
|
||||
("darkmagenta", css(139, 0, 139))
|
||||
("darkolivegreen", css(85, 107, 47))
|
||||
("darkorange", css(255, 140, 0))
|
||||
("darkorchid", css(153, 50, 204))
|
||||
("darkred", css(139, 0, 0))
|
||||
("darksalmon", css(233, 150, 122))
|
||||
("darkseagreen", css(143, 188, 143))
|
||||
("darkslateblue", css(72, 61, 139))
|
||||
("darkslategrey", css(47, 79, 79))
|
||||
("darkturquoise", css(0, 206, 209))
|
||||
("darkviolet", css(148, 0, 211))
|
||||
("deeppink", css(255, 20, 147))
|
||||
("deepskyblue", css(0, 191, 255))
|
||||
("dimgray", css(105, 105, 105))
|
||||
("dimgrey", css(105, 105, 105))
|
||||
("dodgerblue", css(30, 144, 255))
|
||||
("firebrick", css(178, 34, 34))
|
||||
("floralwhite", css(255, 250, 240))
|
||||
("forestgreen", css(34, 139, 34))
|
||||
("fuchsia", css(255, 0, 255))
|
||||
("gainsboro", css(220, 220, 220))
|
||||
("ghostwhite", css(248, 248, 255))
|
||||
("gold", css(255, 215, 0))
|
||||
("goldenrod", css(218, 165, 32))
|
||||
("gray", css(128, 128, 128))
|
||||
("grey", css(128, 128, 128))
|
||||
("green", css(0, 128, 0))
|
||||
("greenyellow", css(173, 255, 47))
|
||||
("honeydew", css(240, 255, 240))
|
||||
("hotpink", css(255, 105, 180))
|
||||
("indianred", css(205, 92, 92))
|
||||
("indigo", css(75, 0, 130))
|
||||
("ivory", css(255, 255, 240))
|
||||
("khaki", css(240, 230, 140))
|
||||
("lavender", css(230, 230, 250))
|
||||
("lavenderblush", css(255, 240, 245))
|
||||
("lawngreen", css(124, 252, 0))
|
||||
("lemonchiffon", css(255, 250, 205))
|
||||
("lightblue", css(173, 216, 230))
|
||||
("lightcoral", css(240, 128, 128))
|
||||
("lightcyan", css(224, 255, 255))
|
||||
("lightgoldenrodyellow", css(250, 250, 210))
|
||||
("lightgray", css(211, 211, 211))
|
||||
("lightgreen", css(144, 238, 144))
|
||||
("lightgrey", css(211, 211, 211))
|
||||
("lightpink", css(255, 182, 193))
|
||||
("lightsalmon", css(255, 160, 122))
|
||||
("lightseagreen", css(32, 178, 170))
|
||||
("lightskyblue", css(135, 206, 250))
|
||||
("lightslategray", css(119, 136, 153))
|
||||
("lightslategrey", css(119, 136, 153))
|
||||
("lightsteelblue", css(176, 196, 222))
|
||||
("lightyellow", css(255, 255, 224))
|
||||
("lime", css(0, 255, 0))
|
||||
("limegreen", css(50, 205, 50))
|
||||
("linen", css(250, 240, 230))
|
||||
("magenta", css(255, 0, 255))
|
||||
("maroon", css(128, 0, 0))
|
||||
("mediumaquamarine", css(102, 205, 170))
|
||||
("mediumblue", css(0, 0, 205))
|
||||
("mediumorchid", css(186, 85, 211))
|
||||
("mediumpurple", css(147, 112, 219))
|
||||
("mediumseagreen", css(60, 179, 113))
|
||||
("mediumslateblue", css(123, 104, 238))
|
||||
("mediumspringgreen", css(0, 250, 154))
|
||||
("mediumturquoise", css(72, 209, 204))
|
||||
("mediumvioletred", css(199, 21, 133))
|
||||
("midnightblue", css(25, 25, 112))
|
||||
("mintcream", css(245, 255, 250))
|
||||
("mistyrose", css(255, 228, 225))
|
||||
("moccasin", css(255, 228, 181))
|
||||
("navajowhite", css(255, 222, 173))
|
||||
("navy", css(0, 0, 128))
|
||||
("oldlace", css(253, 245, 230))
|
||||
("olive", css(128, 128, 0))
|
||||
("olivedrab", css(107, 142, 35))
|
||||
("orange", css(255, 165, 0))
|
||||
("orangered", css(255, 69, 0))
|
||||
("orchid", css(218, 112, 214))
|
||||
("palegoldenrod", css(238, 232, 170))
|
||||
("palegreen", css(152, 251, 152))
|
||||
("paleturquoise", css(175, 238, 238))
|
||||
("palevioletred", css(219, 112, 147))
|
||||
("papayawhip", css(255, 239, 213))
|
||||
("peachpuff", css(255, 218, 185))
|
||||
("peru", css(205, 133, 63))
|
||||
("pink", css(255, 192, 203))
|
||||
("plum", css(221, 160, 221))
|
||||
("powderblue", css(176, 224, 230))
|
||||
("purple", css(128, 0, 128))
|
||||
("red", css(255, 0, 0))
|
||||
("rosybrown", css(188, 143, 143))
|
||||
("royalblue", css(65, 105, 225))
|
||||
("saddlebrown", css(139, 69, 19))
|
||||
("salmon", css(250, 128, 114))
|
||||
("sandybrown", css(244, 164, 96))
|
||||
("seagreen", css(46, 139, 87))
|
||||
("seashell", css(255, 245, 238))
|
||||
("sienna", css(160, 82, 45))
|
||||
("silver", css(192, 192, 192))
|
||||
("skyblue", css(135, 206, 235))
|
||||
("slateblue", css(106, 90, 205))
|
||||
("slategray", css(112, 128, 144))
|
||||
("slategrey", css(112, 128, 144))
|
||||
("snow", css(255, 250, 250))
|
||||
("springgreen", css(0, 255, 127))
|
||||
("steelblue", css(70, 130, 180))
|
||||
("tan", css(210, 180, 140))
|
||||
("teal", css(0, 128, 128))
|
||||
("thistle", css(216, 191, 216))
|
||||
("tomato", css(255, 99, 71))
|
||||
("turquoise", css(64, 224, 208))
|
||||
("violet", css(238, 130, 238))
|
||||
("wheat", css(245, 222, 179))
|
||||
("white", css(255, 255, 255))
|
||||
("whitesmoke", css(245, 245, 245))
|
||||
("yellow", css(255, 255, 0))
|
||||
("yellowgreen", css(154, 205, 50))
|
||||
("transparent", css(0, 0, 0, 0))
|
||||
;
|
||||
}
|
||||
} ;
|
||||
|
||||
// clipper helper
|
||||
|
||||
template <int MIN,int MAX>
|
||||
inline int clip_int(int val)
|
||||
{
|
||||
if (val < MIN ) return MIN;
|
||||
if (val > MAX ) return MAX;
|
||||
return val;
|
||||
}
|
||||
|
||||
struct percent_conv_impl
|
||||
{
|
||||
template <typename T>
|
||||
struct result
|
||||
{
|
||||
typedef unsigned type;
|
||||
};
|
||||
|
||||
unsigned operator() (double val) const
|
||||
{
|
||||
return clip_int<0,255>(int((255.0 * val)/100.0 + 0.5));
|
||||
}
|
||||
};
|
||||
|
||||
struct alpha_conv_impl
|
||||
{
|
||||
template <typename T>
|
||||
struct result
|
||||
{
|
||||
typedef unsigned type;
|
||||
};
|
||||
|
||||
unsigned operator() (double val) const
|
||||
{
|
||||
return clip_int<0,255>(int((255.0 * val) + 0.5));
|
||||
}
|
||||
};
|
||||
|
||||
struct hsl_conv_impl
|
||||
{
|
||||
template<typename T0,typename T1, typename T2, typename T3>
|
||||
struct result
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <typename T0,typename T1, typename T2, typename T3>
|
||||
void operator() (T0 & c, T1 h, T2 s, T3 l) const
|
||||
{
|
||||
double m1,m2;
|
||||
// normalize values
|
||||
h /= 360.0;
|
||||
s /= 100.0;
|
||||
l /= 100.0;
|
||||
|
||||
if (l <= 0.5)
|
||||
m2 = l * (s + 1.0);
|
||||
else
|
||||
m2 = l + s - l*s;
|
||||
m1 = l * 2 - m2;
|
||||
|
||||
double r = hue_to_rgb(m1, m2, h + 1.0/3.0);
|
||||
double g = hue_to_rgb(m1, m2, h);
|
||||
double b = hue_to_rgb(m1, m2, h - 1.0/3.0);
|
||||
|
||||
c.r = clip_int<0,255>(int((255.0 * r) + 0.5));
|
||||
c.g = clip_int<0,255>(int((255.0 * g) + 0.5));
|
||||
c.b = clip_int<0,255>(int((255.0 * b) + 0.5));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
struct css_color_grammar : qi::grammar<Iterator, css(), ascii_space_type>
|
||||
{
|
||||
|
||||
css_color_grammar()
|
||||
: css_color_grammar::base_type(css_color)
|
||||
|
||||
{
|
||||
qi::lit_type lit;
|
||||
qi::_val_type _val;
|
||||
qi::double_type double_;
|
||||
qi::_1_type _1;
|
||||
qi::_a_type _a;
|
||||
qi::_b_type _b;
|
||||
qi::_c_type _c;
|
||||
using ascii::no_case;
|
||||
using phoenix::at_c;
|
||||
|
||||
css_color %= rgba_color
|
||||
| rgba_percent_color
|
||||
| hsl_percent_color
|
||||
| hex_color
|
||||
| hex_color_small
|
||||
| no_case[named];
|
||||
|
||||
hex_color %= lit('#')
|
||||
>> hex2
|
||||
>> hex2
|
||||
>> hex2
|
||||
>> -hex2
|
||||
;
|
||||
|
||||
hex_color_small = lit('#')
|
||||
>> hex1 [ at_c<0>(_val) = _1 | _1 << 4 ]
|
||||
>> hex1 [ at_c<1>(_val) = _1 | _1 << 4 ]
|
||||
>> hex1 [ at_c<2>(_val) = _1 | _1 << 4 ]
|
||||
>> -hex1[ at_c<3>(_val) = _1 | _1 << 4 ]
|
||||
;
|
||||
|
||||
rgba_color = lit("rgb") >> -lit('a')
|
||||
>> lit('(')
|
||||
>> dec3 [at_c<0>(_val) = _1] >> ','
|
||||
>> dec3 [at_c<1>(_val) = _1] >> ','
|
||||
>> dec3 [at_c<2>(_val) = _1]
|
||||
>> -(','>> -double_ [at_c<3>(_val) = alpha_converter(_1)])
|
||||
>> lit(')')
|
||||
;
|
||||
|
||||
rgba_percent_color = lit("rgb") >> -lit('a')
|
||||
>> lit('(')
|
||||
>> double_ [at_c<0>(_val) = percent_converter(_1)] >> '%' >> ','
|
||||
>> double_ [at_c<1>(_val) = percent_converter(_1)] >> '%' >> ','
|
||||
>> double_ [at_c<2>(_val) = percent_converter(_1)] >> '%'
|
||||
>> -(','>> -double_ [at_c<3>(_val) = alpha_converter(_1)])
|
||||
>> lit(')')
|
||||
;
|
||||
|
||||
hsl_percent_color = lit("hsl") >> -lit('a')
|
||||
>> lit('(')
|
||||
>> double_ [ _a = _1] >> ',' // hue 0..360
|
||||
>> double_ [ _b = _1] >> '%' >> ',' // saturation 0..100%
|
||||
>> double_ [ _c = _1] >> '%' // lightness 0..100%
|
||||
>> -(','>> -double_ [at_c<3>(_val) = alpha_converter(_1)]) // opacity 0...1
|
||||
>> lit (')') [ hsl_converter(_val,_a,_b,_c)]
|
||||
;
|
||||
}
|
||||
|
||||
qi::uint_parser< unsigned, 16, 2, 2 > hex2 ;
|
||||
qi::uint_parser< unsigned, 16, 1, 1 > hex1 ;
|
||||
qi::uint_parser< unsigned, 10, 1, 3 > dec3 ;
|
||||
qi::rule<Iterator, css(), ascii_space_type> rgba_color;
|
||||
qi::rule<Iterator, css(), ascii_space_type> rgba_percent_color;
|
||||
qi::rule<Iterator, qi::locals<double,double,double>,css(), ascii_space_type> hsl_percent_color;
|
||||
qi::rule<Iterator, css(), ascii_space_type> hex_color;
|
||||
qi::rule<Iterator, css(), ascii_space_type> hex_color_small;
|
||||
qi::rule<Iterator, css(), ascii_space_type> css_color;
|
||||
named_colors_ named;
|
||||
phoenix::function<percent_conv_impl> percent_converter;
|
||||
phoenix::function<alpha_conv_impl> alpha_converter;
|
||||
phoenix::function<hsl_conv_impl> hsl_converter;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MAPNIK_CSS_COLOR_GRAMMAR_HPP
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
|
||||
// NOTE: This is an implementation header file and is only meant to be included
|
||||
// from implementation files. It therefore doesn't have an include guard.
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION >= 104500
|
||||
|
||||
#include <mapnik/css_color_grammar.hpp>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -98,5 +92,3 @@ css_color_grammar<Iterator>::css_color_grammar()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <mapnik/value_types.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/phoenix_operator.hpp>
|
||||
#include <boost/spirit/include/phoenix_object.hpp>
|
||||
|
@ -76,9 +75,7 @@ expression_grammar<Iterator>::expression_grammar(mapnik::transcoder const& tr)
|
|||
qi::_a_type _a;
|
||||
qi::_b_type _b;
|
||||
qi::_r1_type _r1;
|
||||
#if BOOST_VERSION > 104200
|
||||
qi::no_skip_type no_skip;
|
||||
#endif
|
||||
qi::_val_type _val;
|
||||
qi::lit_type lit;
|
||||
qi::double_type double_;
|
||||
|
@ -172,18 +169,11 @@ expression_grammar<Iterator>::expression_grammar(mapnik::transcoder const& tr)
|
|||
("\\\'", '\'')("\\\"", '\"')
|
||||
;
|
||||
|
||||
#if BOOST_VERSION > 104500
|
||||
quote_char %= char_('\'') | char_('"');
|
||||
ustring %= omit[quote_char[_a = _1]]
|
||||
>> *(unesc_char | "\\x" >> hex | (char_ - lit(_a)))
|
||||
>> lit(_a);
|
||||
attr %= '[' >> no_skip[+~char_(']')] >> ']';
|
||||
#else
|
||||
ustring %= lit('\'')
|
||||
>> *(unesc_char | "\\x" >> hex | (char_ - lit('\'')))
|
||||
>> lit('\'');
|
||||
attr %= '[' >> lexeme[+(char_ - ']')] >> ']';
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,7 @@
|
|||
#include <mapnik/noncopyable.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 104600
|
||||
#include <boost/range/algorithm.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
// stl
|
||||
#include <vector>
|
||||
|
@ -263,13 +259,8 @@ public:
|
|||
int dist, newdist;
|
||||
|
||||
// find closest match based on mean of r,g,b,a
|
||||
#if BOOST_VERSION >= 104600
|
||||
std::vector<rgba>::const_iterator pit =
|
||||
boost::lower_bound(sorted_pal_, c, rgba::mean_sort_cmp());
|
||||
#else
|
||||
std::vector<rgba>::const_iterator pit =
|
||||
std::lower_bound(sorted_pal_.begin(),sorted_pal_.end(), c, rgba::mean_sort_cmp());
|
||||
#endif
|
||||
ind = pit-sorted_pal_.begin();
|
||||
if (ind == sorted_pal_.size())
|
||||
ind--;
|
||||
|
@ -342,11 +333,7 @@ public:
|
|||
create_palette_rek(sorted_pal_, root_.get());
|
||||
|
||||
// sort palette for binary searching in quantization
|
||||
#if BOOST_VERSION >= 104600
|
||||
boost::sort(sorted_pal_, rgba::mean_sort_cmp());
|
||||
#else
|
||||
std::sort(sorted_pal_.begin(), sorted_pal_.end(), rgba::mean_sort_cmp());
|
||||
#endif
|
||||
// returned palette is rearanged, so that colors with a<255 are at the begining
|
||||
pal_remap_.resize(sorted_pal_.size());
|
||||
palette.clear();
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
namespace mapnik { namespace json {
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
template <typename OutputIterator> struct feature_generator_grammar;
|
||||
template <typename OutputIterator> struct multi_geometry_generator_grammar;
|
||||
|
||||
|
@ -60,27 +58,6 @@ private:
|
|||
const std::unique_ptr<multi_geometry_generator_grammar<sink_type> > grammar_;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
class MAPNIK_DECL feature_generator : private mapnik::noncopyable
|
||||
{
|
||||
public:
|
||||
feature_generator() {}
|
||||
~feature_generator() {}
|
||||
bool generate(std::string & geojson, mapnik::feature_impl const& f);
|
||||
};
|
||||
|
||||
class MAPNIK_DECL geometry_generator : private mapnik::noncopyable
|
||||
{
|
||||
public:
|
||||
geometry_generator() {}
|
||||
~geometry_generator() {}
|
||||
bool generate(std::string & geojson, mapnik::geometry_container const& g);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
}}
|
||||
|
||||
|
||||
#endif //MAPNIK_GEOJSON_GENERATOR_HPP
|
||||
#endif // MAPNIK_GEOJSON_GENERATOR_HPP
|
||||
|
|
|
@ -38,11 +38,7 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector<double>& dasharr
|
|||
qi::lit_type lit;
|
||||
qi::char_type char_;
|
||||
qi::ascii::space_type space;
|
||||
#if BOOST_VERSION > 104200
|
||||
qi::no_skip_type no_skip;
|
||||
#else
|
||||
qi::lexeme_type lexeme;
|
||||
#endif
|
||||
using phoenix::push_back;
|
||||
// SVG
|
||||
// dasharray ::= (length | percentage) (comma-wsp dasharray)?
|
||||
|
@ -50,11 +46,7 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector<double>& dasharr
|
|||
//
|
||||
bool r = qi::phrase_parse(first, last,
|
||||
(double_[push_back(phoenix::ref(dasharray), _1)] %
|
||||
#if BOOST_VERSION > 104200
|
||||
no_skip[char_(", ")]
|
||||
#else
|
||||
lexeme[char_(", ")]
|
||||
#endif
|
||||
| lit("none")),
|
||||
space);
|
||||
if (first != last)
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
// boost
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// stl
|
||||
#include <string>
|
||||
|
||||
|
@ -41,8 +39,6 @@ namespace mapnik {
|
|||
|
||||
MAPNIK_DECL bool from_wkt(std::string const& wkt, boost::ptr_vector<geometry_type> & paths);
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
class MAPNIK_DECL wkt_parser : mapnik::noncopyable
|
||||
{
|
||||
typedef std::string::const_iterator iterator_type;
|
||||
|
@ -53,8 +49,6 @@ private:
|
|||
const std::unique_ptr<mapnik::wkt::wkt_collection_grammar<iterator_type> > grammar_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,51 +21,42 @@
|
|||
|
||||
Import ('env')
|
||||
|
||||
can_build = True
|
||||
if env.get('BOOST_LIB_VERSION_FROM_HEADER'):
|
||||
boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1])
|
||||
if boost_version_from_header < 47:
|
||||
can_build = False
|
||||
Import ('plugin_base')
|
||||
|
||||
if not can_build:
|
||||
print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47'
|
||||
else:
|
||||
Import ('plugin_base')
|
||||
PLUGIN_NAME = 'csv'
|
||||
|
||||
PLUGIN_NAME = 'csv'
|
||||
plugin_env = plugin_base.Clone()
|
||||
|
||||
plugin_env = plugin_base.Clone()
|
||||
plugin_sources = Split(
|
||||
"""
|
||||
%(PLUGIN_NAME)s_datasource.cpp
|
||||
""" % locals()
|
||||
)
|
||||
|
||||
plugin_sources = Split(
|
||||
"""
|
||||
%(PLUGIN_NAME)s_datasource.cpp
|
||||
""" % locals()
|
||||
)
|
||||
# Link Library to Dependencies
|
||||
libraries = []
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
||||
# Link Library to Dependencies
|
||||
libraries = []
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.append('mapnik')
|
||||
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.append('mapnik')
|
||||
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries)
|
||||
|
||||
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries)
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET)
|
||||
env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST'])
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET)
|
||||
env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST'])
|
||||
plugin_obj = {
|
||||
'LIBS': libraries,
|
||||
'SOURCES': plugin_sources,
|
||||
}
|
||||
|
||||
plugin_obj = {
|
||||
'LIBS': libraries,
|
||||
'SOURCES': plugin_sources,
|
||||
}
|
||||
|
||||
Return('plugin_obj')
|
||||
Return('plugin_obj')
|
||||
|
|
|
@ -21,54 +21,45 @@
|
|||
|
||||
Import ('env')
|
||||
|
||||
can_build = True
|
||||
if env.get('BOOST_LIB_VERSION_FROM_HEADER'):
|
||||
boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1])
|
||||
if boost_version_from_header < 47:
|
||||
can_build = False
|
||||
Import ('plugin_base')
|
||||
|
||||
if not can_build:
|
||||
print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47'
|
||||
else:
|
||||
Import ('plugin_base')
|
||||
PLUGIN_NAME = 'geojson'
|
||||
|
||||
PLUGIN_NAME = 'geojson'
|
||||
plugin_env = plugin_base.Clone()
|
||||
|
||||
plugin_env = plugin_base.Clone()
|
||||
plugin_sources = Split(
|
||||
"""
|
||||
%(PLUGIN_NAME)s_datasource.cpp
|
||||
%(PLUGIN_NAME)s_featureset.cpp
|
||||
""" % locals()
|
||||
)
|
||||
|
||||
plugin_sources = Split(
|
||||
"""
|
||||
%(PLUGIN_NAME)s_datasource.cpp
|
||||
%(PLUGIN_NAME)s_featureset.cpp
|
||||
""" % locals()
|
||||
)
|
||||
# Link Library to Dependencies
|
||||
libraries = []
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
#if env['THREADING'] == 'multi':
|
||||
# libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
|
||||
# Link Library to Dependencies
|
||||
libraries = []
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
#if env['THREADING'] == 'multi':
|
||||
# libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.append('mapnik')
|
||||
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.append('mapnik')
|
||||
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries)
|
||||
|
||||
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries)
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET)
|
||||
env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST'])
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET)
|
||||
env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST'])
|
||||
plugin_obj = {
|
||||
'LIBS': libraries,
|
||||
'SOURCES': plugin_sources,
|
||||
}
|
||||
|
||||
plugin_obj = {
|
||||
'LIBS': libraries,
|
||||
'SOURCES': plugin_sources,
|
||||
}
|
||||
|
||||
Return('plugin_obj')
|
||||
Return('plugin_obj')
|
||||
|
|
|
@ -21,55 +21,46 @@
|
|||
|
||||
Import ('env')
|
||||
|
||||
can_build = True
|
||||
if env.get('BOOST_LIB_VERSION_FROM_HEADER'):
|
||||
boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1])
|
||||
if boost_version_from_header < 47:
|
||||
can_build = False
|
||||
Import ('plugin_base')
|
||||
|
||||
if not can_build:
|
||||
print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47'
|
||||
else:
|
||||
Import ('plugin_base')
|
||||
PLUGIN_NAME = 'topojson'
|
||||
|
||||
PLUGIN_NAME = 'topojson'
|
||||
plugin_env = plugin_base.Clone()
|
||||
|
||||
plugin_env = plugin_base.Clone()
|
||||
plugin_sources = Split(
|
||||
"""
|
||||
%(PLUGIN_NAME)s_datasource.cpp
|
||||
%(PLUGIN_NAME)s_featureset.cpp
|
||||
%(PLUGIN_NAME)s_grammar.cpp
|
||||
""" % locals()
|
||||
)
|
||||
|
||||
plugin_sources = Split(
|
||||
"""
|
||||
%(PLUGIN_NAME)s_datasource.cpp
|
||||
%(PLUGIN_NAME)s_featureset.cpp
|
||||
%(PLUGIN_NAME)s_grammar.cpp
|
||||
""" % locals()
|
||||
)
|
||||
# Link Library to Dependencies
|
||||
libraries = []
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
#if env['THREADING'] == 'multi':
|
||||
# libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
|
||||
# Link Library to Dependencies
|
||||
libraries = []
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
#if env['THREADING'] == 'multi':
|
||||
# libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.append('mapnik')
|
||||
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.append('mapnik')
|
||||
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries)
|
||||
|
||||
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries)
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET)
|
||||
env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST'])
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET)
|
||||
env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST'])
|
||||
plugin_obj = {
|
||||
'LIBS': libraries,
|
||||
'SOURCES': plugin_sources,
|
||||
}
|
||||
|
||||
plugin_obj = {
|
||||
'LIBS': libraries,
|
||||
'SOURCES': plugin_sources,
|
||||
}
|
||||
|
||||
Return('plugin_obj')
|
||||
Return('plugin_obj')
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
#include <mapnik/config_error.hpp>
|
||||
#include <mapnik/css_color_grammar.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
|
||||
namespace mapnik {
|
||||
|
||||
color parse_color(std::string const& str)
|
||||
|
@ -44,23 +41,9 @@ color parse_color(std::string const& str,
|
|||
std::string::const_iterator first = str.begin();
|
||||
std::string::const_iterator last = str.end();
|
||||
boost::spirit::ascii::space_type space;
|
||||
// boost 1.41 -> 1.44 compatibility, to be removed in mapnik 2.1 (dane)
|
||||
#if BOOST_VERSION >= 104500
|
||||
bool result = boost::spirit::qi::phrase_parse(first, last, g,
|
||||
space,
|
||||
c);
|
||||
#else
|
||||
mapnik::css css_;
|
||||
bool result = boost::spirit::qi::phrase_parse(first, last, g,
|
||||
space,
|
||||
css_);
|
||||
c.set_red(css_.r);
|
||||
c.set_green(css_.g);
|
||||
c.set_blue(css_.b);
|
||||
c.set_alpha(css_.a);
|
||||
|
||||
#endif
|
||||
|
||||
if (result && (first == last))
|
||||
{
|
||||
return c;
|
||||
|
|
|
@ -39,17 +39,11 @@
|
|||
boost::spirit::domain_::domain, name##_expr_type); \
|
||||
BOOST_AUTO(name, boost::proto::deep_copy(expr)); \
|
||||
|
||||
// karma is used by default unless
|
||||
// the boost version is too old
|
||||
// karma is used by default
|
||||
#define MAPNIK_KARMA_TO_STRING
|
||||
|
||||
#ifdef MAPNIK_KARMA_TO_STRING
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION < 104500
|
||||
#undef MAPNIK_KARMA_TO_STRING
|
||||
#else
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#endif
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#endif
|
||||
|
||||
namespace mapnik {
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION >= 104500
|
||||
|
||||
#include <mapnik/css_color_grammar_impl.hpp>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -186,5 +181,3 @@ named_colors_::named_colors_()
|
|||
template struct mapnik::css_color_grammar<std::string::const_iterator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
// mapnik
|
||||
#include <mapnik/image_filter_grammar.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// spirit
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
|
@ -53,17 +50,12 @@ image_filter_grammar<Iterator,ContType>::image_filter_grammar()
|
|||
qi::eps_type eps;
|
||||
qi::char_type char_;
|
||||
qi::double_type double_;
|
||||
qi::no_skip_type no_skip;
|
||||
using phoenix::push_back;
|
||||
using phoenix::construct;
|
||||
using phoenix::at_c;
|
||||
#if BOOST_VERSION >= 104700
|
||||
qi::no_skip_type no_skip;
|
||||
start = -(filter % no_skip[*char_(", ")])
|
||||
;
|
||||
#else
|
||||
start = -(filter)
|
||||
;
|
||||
#endif
|
||||
|
||||
filter =
|
||||
lit("emboss") >> no_args [push_back(_val,construct<mapnik::filter::emboss>())]
|
||||
|
|
|
@ -20,20 +20,11 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// TODO https://github.com/mapnik/mapnik/issues/1658
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 105200
|
||||
#ifndef BOOST_SPIRIT_USE_PHOENIX_V3
|
||||
#define BOOST_SPIRIT_USE_PHOENIX_V3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/json/feature_collection_parser.hpp>
|
||||
#include <mapnik/json/feature_collection_grammar.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/support_multi_pass.hpp>
|
||||
|
||||
|
@ -42,8 +33,6 @@
|
|||
|
||||
namespace mapnik { namespace json {
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
template <typename Iterator>
|
||||
feature_collection_parser<Iterator>::feature_collection_parser(generic_json<Iterator> & json,
|
||||
mapnik::context_ptr const& ctx,
|
||||
|
@ -52,21 +41,13 @@ namespace mapnik { namespace json {
|
|||
|
||||
template <typename Iterator>
|
||||
feature_collection_parser<Iterator>::~feature_collection_parser() {}
|
||||
#endif
|
||||
|
||||
template <typename Iterator>
|
||||
bool feature_collection_parser<Iterator>::parse(iterator_type first, iterator_type last, std::vector<mapnik::feature_ptr> & features)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
using namespace boost::spirit;
|
||||
standard_wide::space_type space;
|
||||
return qi::phrase_parse(first, last, *grammar_, space, features);
|
||||
#else
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("mapnik::feature_collection_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
template class feature_collection_parser<std::string::const_iterator> ;
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/json/feature_grammar.hpp>
|
||||
|
@ -41,11 +38,7 @@ feature_grammar<Iterator,FeatureType>::feature_grammar(generic_json<Iterator> &
|
|||
qi::lit_type lit;
|
||||
qi::long_long_type long_long;
|
||||
qi::double_type double_;
|
||||
#if BOOST_VERSION > 104200
|
||||
qi::no_skip_type no_skip;
|
||||
#else
|
||||
qi::lexeme_type lexeme;
|
||||
#endif
|
||||
standard_wide::char_type char_;
|
||||
qi::_val_type _val;
|
||||
qi::_1_type _1;
|
||||
|
@ -81,12 +74,7 @@ feature_grammar<Iterator,FeatureType>::feature_grammar(generic_json<Iterator> &
|
|||
>> json_.value >> *(lit(',') >> json_.value)
|
||||
>> lit(']')
|
||||
;
|
||||
// https://github.com/mapnik/mapnik/issues/1342
|
||||
#if BOOST_VERSION >= 104700
|
||||
json_.number %= json_.strict_double
|
||||
#else
|
||||
json_.number = json_.strict_double
|
||||
#endif
|
||||
| json_.int__
|
||||
| lit("true") [_val = true]
|
||||
| lit ("false") [_val = false]
|
||||
|
@ -103,15 +91,11 @@ feature_grammar<Iterator,FeatureType>::feature_grammar(generic_json<Iterator> &
|
|||
("\\r", '\r') // carrige return
|
||||
("\\t", '\t') // tab
|
||||
;
|
||||
#if BOOST_VERSION > 104200
|
||||
|
||||
json_.string_ %= lit('"') >> no_skip[*(json_.unesc_char | "\\u" >> json_.hex4 | (char_ - lit('"')))] >> lit('"')
|
||||
;
|
||||
#else
|
||||
json_.string_ %= lit('"') >> lexeme[*(json_.unesc_char | "\\u" >> json_.hex4 | (char_ - lit('"')))] >> lit('"')
|
||||
;
|
||||
#endif
|
||||
// geojson types
|
||||
|
||||
// geojson types
|
||||
feature_type = lit("\"type\"")
|
||||
>> lit(':')
|
||||
>> lit("\"Feature\"")
|
||||
|
@ -154,5 +138,3 @@ template struct mapnik::json::feature_grammar<std::string::const_iterator,mapnik
|
|||
template struct mapnik::json::feature_grammar<boost::spirit::multi_pass<std::istreambuf_iterator<char> >,mapnik::feature_impl>;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/json/feature_parser.hpp>
|
||||
#include <mapnik/json/feature_grammar.hpp>
|
||||
|
@ -32,29 +30,19 @@
|
|||
|
||||
namespace mapnik { namespace json {
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
template <typename Iterator>
|
||||
feature_parser<Iterator>::feature_parser(generic_json<Iterator> & json, mapnik::transcoder const& tr)
|
||||
: grammar_(new feature_grammar<iterator_type,feature_type>(json, tr)) {}
|
||||
|
||||
template <typename Iterator>
|
||||
feature_parser<Iterator>::~feature_parser() {}
|
||||
#endif
|
||||
|
||||
template <typename Iterator>
|
||||
bool feature_parser<Iterator>::parse(iterator_type first, iterator_type last, mapnik::feature_impl & f)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
using namespace boost::spirit;
|
||||
standard_wide::space_type space;
|
||||
return qi::phrase_parse(first, last, (*grammar_)(boost::phoenix::ref(f)), space);
|
||||
#else
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("mapnik::feature_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
template class feature_parser<std::string::const_iterator>;
|
||||
|
|
|
@ -21,14 +21,11 @@
|
|||
*****************************************************************************/
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/json/geojson_generator.hpp>
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
#include <mapnik/json/feature_generator_grammar.hpp>
|
||||
#include <mapnik/json/geometry_generator_grammar.hpp>
|
||||
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
|
||||
namespace mapnik { namespace json {
|
||||
|
@ -56,31 +53,3 @@ bool geometry_generator::generate(std::string & geojson, mapnik::geometry_contai
|
|||
}
|
||||
|
||||
}}
|
||||
|
||||
#else
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace mapnik { namespace json {
|
||||
|
||||
bool feature_generator::generate(std::string & geojson, mapnik::feature_impl const& f)
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("feature_generator::generate() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
bool geometry_generator::generate(std::string & geojson, mapnik::geometry_container const& g)
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("geometry_generator::generate() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/json/geometry_grammar.hpp>
|
||||
|
||||
|
@ -165,5 +162,3 @@ template struct mapnik::json::geometry_grammar<std::string::const_iterator>;
|
|||
template struct mapnik::json::geometry_grammar<boost::spirit::multi_pass<std::istreambuf_iterator<char> > >;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <mapnik/json/geometry_grammar.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/support_multi_pass.hpp>
|
||||
#include <boost/spirit/include/phoenix_core.hpp>
|
||||
|
@ -35,45 +34,28 @@
|
|||
|
||||
namespace mapnik { namespace json {
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
template <typename Iterator>
|
||||
geometry_parser<Iterator>::geometry_parser()
|
||||
: grammar_(new geometry_grammar<iterator_type>()) {}
|
||||
|
||||
template <typename Iterator>
|
||||
geometry_parser<Iterator>::~geometry_parser() {}
|
||||
#endif
|
||||
|
||||
template <typename Iterator>
|
||||
bool geometry_parser<Iterator>::parse(iterator_type first, iterator_type last, boost::ptr_vector<mapnik::geometry_type>& path)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
using namespace boost::spirit;
|
||||
standard_wide::space_type space;
|
||||
return qi::phrase_parse(first, last, (*grammar_)(boost::phoenix::ref(path)), space);
|
||||
#else
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("mapnik::geometry_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool from_geojson(std::string const& json, boost::ptr_vector<geometry_type> & paths)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
geometry_parser<std::string::const_iterator> parser;
|
||||
std::string::const_iterator start = json.begin();
|
||||
std::string::const_iterator end = json.end();
|
||||
return parser.parse(start, end ,paths);
|
||||
#else
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("mapnik::json::from_geojson() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
template class geometry_parser<std::string::const_iterator> ;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <mapnik/transform_expression_grammar.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/phoenix_operator.hpp>
|
||||
#include <boost/spirit/include/phoenix_object.hpp>
|
||||
|
@ -58,13 +57,8 @@ transform_expression_grammar<Iterator>::transform_expression_grammar(expression_
|
|||
// the order provided. The individual transform definitions are
|
||||
// separated by whitespace and/or a comma.
|
||||
|
||||
#if BOOST_VERSION > 104200
|
||||
qi::no_skip_type no_skip;
|
||||
start = transform_ % no_skip[char_(", ")] ;
|
||||
#else
|
||||
qi::lexeme_type lexeme;
|
||||
start = transform_ % lexeme[char_(", ")] ;
|
||||
#endif
|
||||
|
||||
transform_ = matrix | translate | scale | rotate | skewX | skewY ;
|
||||
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/wkt/wkt_factory.hpp>
|
||||
#include <mapnik/wkt/wkt_grammar.hpp>
|
||||
|
@ -32,11 +29,9 @@
|
|||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
wkt_parser::wkt_parser()
|
||||
: grammar_(new mapnik::wkt::wkt_collection_grammar<iterator_type>)
|
||||
{}
|
||||
|
@ -49,19 +44,11 @@ bool wkt_parser::parse(std::string const& wkt, boost::ptr_vector<geometry_type>
|
|||
iterator_type last = wkt.end();
|
||||
return qi::phrase_parse(first, last, *grammar_, space, paths);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool from_wkt(std::string const& wkt, boost::ptr_vector<geometry_type> & paths)
|
||||
{
|
||||
#if BOOST_VERSION >= 104700
|
||||
wkt_parser parser;
|
||||
return parser.parse(wkt,paths);
|
||||
#else
|
||||
std::ostringstream s;
|
||||
s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
|
||||
throw std::runtime_error("mapnik::from_wkt() requires at least boost 1.47 while your build was compiled against boost " + s.str());
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
#include <mapnik/geometry.hpp>
|
||||
#include <mapnik/util/geometry_wkt_generator.hpp>
|
||||
#include <mapnik/util/geometry_to_wkt.hpp>
|
||||
|
@ -171,5 +167,3 @@ bool to_wkt(std::string & wkt, mapnik::geometry_container const& geom)
|
|||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
@ -205,9 +204,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ AGG blending: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
std::clog << "C++ AGG blending: ";
|
||||
return ::boost::report_errors();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
// boost
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// stl
|
||||
#include <stdexcept>
|
||||
|
@ -126,9 +125,7 @@ int main(int argc, char** argv)
|
|||
{
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ clipping: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <mapnik/value_types.hpp>
|
||||
#include <mapnik/util/conversions.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
@ -286,9 +285,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ type conversions: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <mapnik/projection.hpp>
|
||||
|
@ -93,9 +92,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ exceptions: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include <mapnik/util/fs.hpp>
|
||||
#include <mapnik/debug.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
@ -97,9 +96,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ fonts registration: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <mapnik/memory_datasource.hpp>
|
||||
|
@ -75,9 +74,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ fontset runtime: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include "utils.hpp"
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
#include <mapnik/layer.hpp>
|
||||
#include <mapnik/feature_type_style.hpp>
|
||||
#include <mapnik/debug.hpp>
|
||||
|
@ -124,7 +122,6 @@ boost::optional<std::string> polygon_bbox_clipping(mapnik::box2d<double> bbox,
|
|||
|
||||
return boost::optional<std::string>();
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -137,8 +134,6 @@ int main(int argc, char** argv)
|
|||
|
||||
BOOST_TEST(set_working_dir(args));
|
||||
|
||||
#if BOOST_VERSION >= 104700
|
||||
|
||||
// LineString/bbox clipping
|
||||
{
|
||||
std::string wkt_in("LineString(0 0,200 200)");
|
||||
|
@ -175,17 +170,13 @@ int main(int argc, char** argv)
|
|||
BOOST_TEST(result);
|
||||
BOOST_TEST_EQ(*result,std::string("Polygon((50 50,50 100,75 150,125 150,150 100,150 50,50 50))"));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
if (!::boost::detail::test_errors())
|
||||
{
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ geometry conversions: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <mapnik/image_reader.hpp>
|
||||
|
@ -112,9 +110,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ image i/o: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <mapnik/geometry.hpp>
|
||||
|
@ -58,9 +57,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ label algorithms: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
@ -160,9 +159,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ Map Request rendering hook: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <mapnik/value_types.hpp>
|
||||
|
@ -82,9 +81,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ parameters: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
#include <mapnik/params.hpp>
|
||||
|
@ -118,9 +117,7 @@ int main(int argc, char** argv)
|
|||
if (!::boost::detail::test_errors()) {
|
||||
if (quiet) std::clog << "\x1b[1;32m.\x1b[0m";
|
||||
else std::clog << "C++ CSV parse: \x1b[1;32m✓ \x1b[0m\n";
|
||||
#if BOOST_VERSION >= 104600
|
||||
::boost::detail::report_errors_remind().called_report_errors_function = true;
|
||||
#endif
|
||||
} else {
|
||||
return ::boost::report_errors();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue