Fix a warning

This commit is contained in:
Victor Zverovich 2016-04-26 07:23:03 -07:00
parent 49f6771ca9
commit 90accff030

View File

@ -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;