Fix compile error due to -Werror=conversion

This commit is contained in:
Alecto Irene Perez 2023-03-03 15:18:14 -05:00
parent 46ae7ea83d
commit 69f90943a6
No known key found for this signature in database
GPG Key ID: 914D0B2EA4620466

View File

@ -2218,7 +2218,7 @@ FMT_CONSTEXPR inline auto code_point_length_impl(char c) -> int {
// This is useful because it allows the compiler to check that the
// length is within the range [1, 4]
FMT_CONSTEXPR inline auto code_point_length_impl_2(char c) -> int {
return ((0x3a55000000000000ull >> (2 * (static_cast<unsigned char>(c) >> 3))) & 0x3) + 1;
return static_cast<int>((0x3a55000000000000ull >> (2 * (static_cast<unsigned char>(c) >> 3))) & 0x3) + 1;
}
template <typename Char>