From 5a76e633ea9b5adb215e93fdc11e1c0c08b3fc74 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 17 Nov 2016 16:48:38 -0800 Subject: Integrated internal changes from Google --- src/google/protobuf/stubs/mathutil.h | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/google/protobuf/stubs/mathutil.h') diff --git a/src/google/protobuf/stubs/mathutil.h b/src/google/protobuf/stubs/mathutil.h index 27956a8e..8a9f69a0 100644 --- a/src/google/protobuf/stubs/mathutil.h +++ b/src/google/protobuf/stubs/mathutil.h @@ -40,27 +40,6 @@ namespace google { namespace protobuf { namespace internal { -template -bool IsNan(T value) { - return false; -} -template<> -inline bool IsNan(float value) { -#ifdef _MSC_VER - return _isnan(value); -#else - return isnan(value); -#endif -} -template<> -inline bool IsNan(double value) { -#ifdef _MSC_VER - return _isnan(value); -#else - return isnan(value); -#endif -} - template bool AlmostEquals(T a, T b) { return a == b; @@ -80,7 +59,7 @@ class MathUtil { public: template static T Sign(T value) { - if (value == T(0) || ::google::protobuf::internal::IsNan(value)) { + if (value == T(0) || MathLimits::IsNaN(value)) { return value; } return value > T(0) ? 1 : -1; -- cgit v1.2.3