mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-05 13:36:32 -04:00
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:
parent
f2de8e1959
commit
d059b51d5a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user