diff options
Diffstat (limited to 'boost/spirit/home/karma/numeric/detail/numeric_utils.hpp')
-rw-r--r-- | boost/spirit/home/karma/numeric/detail/numeric_utils.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp b/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp index 2ce7b743ad..a36893e57e 100644 --- a/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp +++ b/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp @@ -68,7 +68,7 @@ namespace boost { namespace spirit { namespace traits typedef unsignedtype type; \ static type call(signedtype n) \ { \ - return (n >= 0) ? n : (unsignedtype)(-n); \ + return static_cast<unsignedtype>((n >= 0) ? n : -n); \ } \ } \ /**/ @@ -285,7 +285,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(T n) { - if (!std::numeric_limits<T>::has_infinity) + if (!std::numeric_limits<T>::has_infinity) return false; return (n == std::numeric_limits<T>::infinity()) ? true : false; } @@ -771,4 +771,3 @@ namespace boost { namespace spirit { namespace karma }}} #endif - |