mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Fix MSVC warnings
This commit is contained in:
parent
8beadace37
commit
646829e34d
8
format.h
8
format.h
@ -227,6 +227,7 @@ typedef std::numeric_limits<fmt::internal::DummyInt> FPUtil;
|
|||||||
// if the latter are not available.
|
// if the latter are not available.
|
||||||
inline DummyInt signbit(...) { return DummyInt(); }
|
inline DummyInt signbit(...) { return DummyInt(); }
|
||||||
inline DummyInt _ecvt_s(...) { return DummyInt(); }
|
inline DummyInt _ecvt_s(...) { return DummyInt(); }
|
||||||
|
inline DummyInt _ecvt(...) { return DummyInt(); }
|
||||||
inline DummyInt isinf(...) { return DummyInt(); }
|
inline DummyInt isinf(...) { return DummyInt(); }
|
||||||
inline DummyInt _finite(...) { return DummyInt(); }
|
inline DummyInt _finite(...) { return DummyInt(); }
|
||||||
inline DummyInt isnan(...) { return DummyInt(); }
|
inline DummyInt isnan(...) { return DummyInt(); }
|
||||||
@ -274,11 +275,10 @@ class numeric_limits<fmt::internal::DummyInt> :
|
|||||||
if (sizeof(_ecvt_s(0, 0, x, 0, 0, 0)) == sizeof(int)) {
|
if (sizeof(_ecvt_s(0, 0, x, 0, 0, 0)) == sizeof(int)) {
|
||||||
char buffer[2]; // The buffer size must be >= 2 or _ecvt_s will fail.
|
char buffer[2]; // The buffer size must be >= 2 or _ecvt_s will fail.
|
||||||
_ecvt_s(buffer, sizeof(buffer), x, 0, &dec, &sign);
|
_ecvt_s(buffer, sizeof(buffer), x, 0, &dec, &sign);
|
||||||
return sign;
|
return sign != 0;
|
||||||
}
|
}
|
||||||
char *result = ecvt(x, 0, &dec, &sign);
|
_ecvt(x, 0, &dec, &sign);
|
||||||
(void)result; // Suppress a warning about unused return value of ecvt.
|
return sign != 0;
|
||||||
return sign;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
Loading…
Reference in New Issue
Block a user