fix: avoid an implicit conversion using size_t

The number of bits is used to express the size of a buffer. Using an
`int` causes an implicit conversion warning, let's use a `size_t` which
is the right type for the job.
This commit is contained in:
Edoardo Morandi 2025-05-14 11:42:25 +02:00
parent f2de8e1959
commit d059b51d5a
No known key found for this signature in database
GPG Key ID: E9E844476BF3C998

View File

@ -2018,7 +2018,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
const format_specs& specs) -> OutputIt {
static_assert(std::is_same<T, uint32_or_64_or_128_t<T>>::value, "");
constexpr int buffer_size = num_bits<T>();
constexpr size_t buffer_size = num_bits<T>();
char buffer[buffer_size];
if (is_constant_evaluated()) fill_n(buffer, buffer_size, '\0');
const char* begin = nullptr;