diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-02-03 18:40:35 -0500 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-02-05 13:53:16 -0500 |
commit | 93e72f29f5d58dff1229c8db9db62b4f02324117 (patch) | |
tree | 975970f00278485ab112767e2758d290da588665 /src/third_party | |
parent | 68fe6570d19c744f84861b70d541e8b46ac24935 (diff) | |
download | mongo-93e72f29f5d58dff1229c8db9db62b4f02324117.tar.gz |
SERVER-8944 Use C++11 standard library functions for double NaN and Infinity detection
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/s2/base/port.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/third_party/s2/base/port.h b/src/third_party/s2/base/port.h index 54a6cbe2ebe..6731c175d01 100644 --- a/src/third_party/s2/base/port.h +++ b/src/third_party/s2/base/port.h @@ -716,17 +716,8 @@ inline void va_copy(va_list& a, va_list& b) { a = b; } #endif -using namespace std; -#define isnan _isnan + #define snprintf _snprintf -#include "float.h" -inline double sqrt(int x) { return sqrt((double)x); } -inline int isinf(double x) { - const int float_point_class =_fpclass(x); - if (float_point_class == _FPCLASS_PINF) return 1; - if (float_point_class == _FPCLASS_NINF) return -1; - return 0; -} #endif #ifdef COMPILER_MSVC /* if Visual C++ */ |