From e567fe69604b7c2b5c112f77e388734ee110fe2a Mon Sep 17 00:00:00 2001 From: vitaut Date: Fri, 4 Dec 2015 17:52:06 -0800 Subject: [PATCH] Replace "!!" with "!= 0" for readability --- format.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/format.h b/format.h index a0101be1..a0b49ba0 100644 --- a/format.h +++ b/format.h @@ -282,7 +282,7 @@ class numeric_limits : // 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(x)); } @@ -293,7 +293,7 @@ class numeric_limits : 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(x)) != 0; } @@ -302,7 +302,7 @@ class numeric_limits : 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;