From 2b8abc4bfac6616f4027bbc4e2a504b63594515b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Jul 2015 19:19:39 -0700 Subject: [PATCH] fix #2975 - remove usage of boost/algorithm/clamp.hpp --- include/mapnik/transform_processor.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/mapnik/transform_processor.hpp b/include/mapnik/transform_processor.hpp index 5bd25ee3b..bec6bff3b 100644 --- a/include/mapnik/transform_processor.hpp +++ b/include/mapnik/transform_processor.hpp @@ -31,8 +31,7 @@ #include // agg #include -// boost -#include + // stl #include @@ -154,14 +153,18 @@ struct transform_processor void operator() (skewX_node const& node) { auto degrees = std::fmod(eval(node.angle_),90.0); - auto angle = deg2rad(boost::algorithm::clamp(degrees, -89.0, 89.0)); + if (degrees < -89.0) degrees = -89.0; + else if (degrees > 89.0) degrees = 89.0; + auto angle = deg2rad(degrees); transform_.multiply(agg::trans_affine_skewing(angle, 0.0)); } void operator() (skewY_node const& node) { auto degrees = std::fmod(eval(node.angle_),90.0); - auto angle = deg2rad(boost::algorithm::clamp(degrees, -89.0, 89.0)); + if (degrees < -89.0) degrees = -89.0; + else if (degrees > 89.0) degrees = 89.0; + auto angle = deg2rad(degrees); transform_.multiply(agg::trans_affine_skewing(0.0, angle)); }