diff --git a/mfbt/FloatingPoint.h b/mfbt/FloatingPoint.h index 51a869374f2b..f4ae36257bba 100644 --- a/mfbt/FloatingPoint.h +++ b/mfbt/FloatingPoint.h @@ -162,12 +162,7 @@ struct FloatingPoint final : private detail::FloatingPointTrait { template static MOZ_ALWAYS_INLINE bool IsNegative(T aValue) { MOZ_ASSERT(!std::isnan(aValue), "NaN does not have a sign"); - - /* The sign bit is set if the double is negative. */ - typedef FloatingPoint Traits; - typedef typename Traits::Bits Bits; - Bits bits = BitwiseCast(aValue); - return (bits & Traits::kSignBit) != 0; + return std::signbit(aValue); } /** Determines whether a float/double represents -0. */