From 90accff0305cb85ca88078d8dc6b9fdc452a60b8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 26 Apr 2016 07:23:03 -0700 Subject: [PATCH] Fix a warning --- fmt/format.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fmt/format.h b/fmt/format.h index a42e29f8..788ec7cf 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -2832,7 +2832,8 @@ void BasicWriter::write_int(T value, Spec spec) { case 'n': { unsigned num_digits = internal::count_digits(abs_value); fmt::StringRef sep = std::localeconv()->thousands_sep; - std::size_t size = num_digits + sep.size() * (num_digits - 1) / 3; + unsigned size = static_cast( + num_digits + sep.size() * (num_digits - 1) / 3); CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1; internal::format_decimal(get(p), abs_value, 0, internal::ThousandsSep(sep)); break;