From 628a2825f8dc0219964886e7cc3f7f519e3bd950 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 4 Jan 2022 18:04:19 -0800 Subject: Export of internal Abseil changes -- 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 by Abseil Team : Another implicit sign conversion found and removed. PiperOrigin-RevId: 419718762 -- dbb6bca7d3cfa9ce79e70d0ed3d0354a4e3a0983 by Abseil Team : Fix sign conversions so that absl/status/status.h can compile with -Wconversion -Wsign-compare PiperOrigin-RevId: 419658075 GitOrigin-RevId: 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 Change-Id: I18441488cc84f573c2818ee241c387e1953d5105 --- absl/numeric/bits.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'absl/numeric') diff --git a/absl/numeric/bits.h b/absl/numeric/bits.h index 52013ad4..628cdf50 100644 --- a/absl/numeric/bits.h +++ b/absl/numeric/bits.h @@ -133,7 +133,8 @@ template ABSL_INTERNAL_CONSTEXPR_CLZ inline typename std::enable_if::value, T>::type bit_width(T x) noexcept { - return std::numeric_limits::digits - countl_zero(x); + return std::numeric_limits::digits - + static_cast(countl_zero(x)); } // Returns: If x == 0, 0; otherwise the maximal value y such that -- cgit v1.2.3