| Index: base/numerics/safe_math_impl.h
|
| diff --git a/base/numerics/safe_math_impl.h b/base/numerics/safe_math_impl.h
|
| index f648d1642074f9071c66891e9bd2f4e8f7a7afb8..ae0a5b1d4f031d8228ee47172daf27153dd6ce77 100644
|
| --- a/base/numerics/safe_math_impl.h
|
| +++ b/base/numerics/safe_math_impl.h
|
| @@ -47,8 +47,8 @@
|
| template <typename T>
|
| constexpr bool HasSignBit(T x) {
|
| // Cast to unsigned since right shift on signed is undefined.
|
| - return static_cast<typename std::make_signed<T>::type>(x) <
|
| - static_cast<typename std::make_signed<T>::type>(0);
|
| + return !!(static_cast<typename std::make_unsigned<T>::type>(x) >>
|
| + PositionOfSignBit<T>::value);
|
| }
|
|
|
| // This wrapper undoes the standard integer promotions.
|
|
|