mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Simplify isinfinity.
This commit is contained in:
parent
1a0c76a81a
commit
d4412a01f0
16
format.cc
16
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user