From d4412a01f0b5b8e6c293664e35d20dfbfe1d45d8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 13 Aug 2014 08:01:51 -0700 Subject: [PATCH] Simplify isinfinity. --- format.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/format.cc b/format.cc index 68c58b61..0a839223 100644 --- a/format.cc +++ b/format.cc @@ -75,21 +75,13 @@ inline int getsign(double x) { } // Portable version of isinf. -inline int isinfinity(double x) { #ifdef isinf - return isinf(x); +inline int isinfinity(double x) { return isinf(x); } +inline int isinfinity(long double x) { return isinf(x); } #else - return std::isinf(x); +inline int isinfinity(double x) { return std::isinf(x); } +inline int isinfinity(long double x) { return std::isinf(x); } #endif -} - -inline int isinfinity(long double x) { -#ifdef isinf - return isinf(x); -#else - return std::isinf(x); -#endif -} #define FMT_SNPRINTF snprintf