Commit e567fe69 authored by vitaut's avatar vitaut

Replace "!!" with "!= 0" for readability

parent 7c60db1e
......@@ -282,7 +282,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) != 0;
}
return !_finite(static_cast<double>(x));
}
......@@ -293,7 +293,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) != 0;
}
return _isnan(static_cast<double>(x)) != 0;
}
......@@ -302,7 +302,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) != 0;
if (x < 0) return true;
if (!isnotanumber(x)) return false;
int dec = 0, sign = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment