Simplify isinfinity.

This commit is contained in:
Victor Zverovich 2014-08-13 08:01:51 -07:00
parent 1a0c76a81a
commit d4412a01f0

View File

@ -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