From 48d4bfb1705c126b2e93e11c765e46c19bf22b95 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 15 Jun 2015 19:34:16 -0700 Subject: [PATCH] proper use of std:: in safe_cast --- include/mapnik/safe_cast.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/mapnik/safe_cast.hpp b/include/mapnik/safe_cast.hpp index 9e64c003c..d8973032e 100644 --- a/include/mapnik/safe_cast.hpp +++ b/include/mapnik/safe_cast.hpp @@ -25,6 +25,7 @@ #include #include +#include namespace mapnik { @@ -60,11 +61,11 @@ struct numeric_compare::v std::is_integral::value && std::is_signed::value && std::is_unsigned::value>::type> { static inline bool less(T t, S s) { - return (t < static_cast(0)) ? true : static_cast(t) < static_cast(s); + return (t < static_cast(0)) ? true : static_cast(t) < static_cast(s); } static inline bool greater(T t, S s) { - return (t < static_cast(0)) ? false : static_cast(t) > static_cast(s); + return (t < static_cast(0)) ? false : static_cast(t) > static_cast(s); } }; @@ -73,11 +74,11 @@ struct numeric_compare::v std::is_integral::value && std::is_unsigned::value && std::is_signed::value>::type> { static inline bool less(T t, S s) { - return (s < static_cast(0)) ? false : static_cast(t) < static_cast(s); + return (s < static_cast(0)) ? false : static_cast(t) < static_cast(s); } static inline bool greater(T t, S s) { - return (s < static_cast(0)) ? true : static_cast(t) > static_cast(s); + return (s < static_cast(0)) ? true : static_cast(t) > static_cast(s); } };