mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Silence some performance warnings in Visual Studio
This commit is contained in:
parent
fac207816c
commit
df2dfd9612
6
format.h
6
format.h
@ -256,7 +256,7 @@ class numeric_limits<fmt::internal::DummyInt> :
|
||||
// isinf macro > std::isinf > ::isinf > fmt::internal::isinf
|
||||
if (check(sizeof(isinf(x)) == sizeof(bool) ||
|
||||
sizeof(isinf(x)) == sizeof(int))) {
|
||||
return isinf(x);
|
||||
return !!isinf(x);
|
||||
}
|
||||
return !_finite(static_cast<double>(x));
|
||||
}
|
||||
@ -267,7 +267,7 @@ class numeric_limits<fmt::internal::DummyInt> :
|
||||
using namespace fmt::internal;
|
||||
if (check(sizeof(isnan(x)) == sizeof(bool) ||
|
||||
sizeof(isnan(x)) == sizeof(int))) {
|
||||
return isnan(x);
|
||||
return !!isnan(x);
|
||||
}
|
||||
return _isnan(static_cast<double>(x)) != 0;
|
||||
}
|
||||
@ -276,7 +276,7 @@ class numeric_limits<fmt::internal::DummyInt> :
|
||||
static bool isnegative(double x) {
|
||||
using namespace fmt::internal;
|
||||
if (check(sizeof(signbit(x)) == sizeof(int)))
|
||||
return signbit(x);
|
||||
return !!signbit(x);
|
||||
if (x < 0) return true;
|
||||
if (!isnotanumber(x)) return false;
|
||||
int dec = 0, sign = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user