include/fmt/format.h: explicit cast to std::size_t for parameter to buffer.resize() in order to get rid of warning 'implicit conversion changes signedness:' in clang-8 (#1802)

Co-authored-by: Martin Wührer <martin.wuehrer@artech.at>
This commit is contained in:
medithe 2020-08-05 18:37:10 +02:00 committed by GitHub
parent 2a69f56769
commit 717b226b59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1593,7 +1593,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
format_decimal(digits, abs_value, num_digits); format_decimal(digits, abs_value, num_digits);
basic_memory_buffer<Char> buffer; basic_memory_buffer<Char> buffer;
size += prefix_size; size += prefix_size;
buffer.resize(size); buffer.resize(to_unsigned(size));
basic_string_view<Char> s(&sep, sep_size); basic_string_view<Char> s(&sep, sep_size);
// Index of a decimal digit with the least significant digit having index 0. // Index of a decimal digit with the least significant digit having index 0.
int digit_index = 0; int digit_index = 0;