mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Fix a warning
This commit is contained in:
parent
49f6771ca9
commit
90accff030
@ -2832,7 +2832,8 @@ void BasicWriter<Char>::write_int(T value, Spec spec) {
|
|||||||
case 'n': {
|
case 'n': {
|
||||||
unsigned num_digits = internal::count_digits(abs_value);
|
unsigned num_digits = internal::count_digits(abs_value);
|
||||||
fmt::StringRef sep = std::localeconv()->thousands_sep;
|
fmt::StringRef sep = std::localeconv()->thousands_sep;
|
||||||
std::size_t size = num_digits + sep.size() * (num_digits - 1) / 3;
|
unsigned size = static_cast<unsigned>(
|
||||||
|
num_digits + sep.size() * (num_digits - 1) / 3);
|
||||||
CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1;
|
CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1;
|
||||||
internal::format_decimal(get(p), abs_value, 0, internal::ThousandsSep(sep));
|
internal::format_decimal(get(p), abs_value, 0, internal::ThousandsSep(sep));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user