diff --git a/format.cc b/format.cc index c592f8ae..03c10e40 100644 --- a/format.cc +++ b/format.cc @@ -31,19 +31,9 @@ #undef _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS -#include - #include "format.h" #include -#include -#include - -#if _MSC_VER -# undef snprintf -# define snprintf _snprintf -# define isinf(x) (!_finite(x)) -#endif const char fmt::internal::DIGITS[] = "0001020304050607080910111213141516171819" diff --git a/format.h b/format.h index b62356b4..d5971618 100644 --- a/format.h +++ b/format.h @@ -181,6 +181,9 @@ inline int SignBit(double value) { _ecvt(value, 0, &dec, &sign); return sign; } +inline int isinf(double x) { return !_finite(x); } +# undef snprintf +# define snprintf _snprintf #endif template