Fix warnings

This commit is contained in:
Victor Zverovich 2018-12-06 07:27:46 -08:00
parent bd1104046b
commit 3242ddf7b5

View File

@ -159,7 +159,7 @@ struct chrono_formatter {
void write(int value, int width) { void write(int value, int width) {
typedef typename int_traits<int>::main_type main_type; typedef typename int_traits<int>::main_type main_type;
main_type n = value; main_type n = value;
auto num_digits = internal::count_digits(n); int num_digits = internal::count_digits(n);
if (width > num_digits) if (width > num_digits)
out = std::fill_n(out, width - num_digits, '0'); out = std::fill_n(out, width - num_digits, '0');
out = format_decimal<char_type>(out, n, num_digits); out = format_decimal<char_type>(out, n, num_digits);
@ -215,7 +215,7 @@ struct chrono_formatter {
write(to_int(s.count() % 60), 2); write(to_int(s.count() % 60), 2);
if (ms != std::chrono::milliseconds()) { if (ms != std::chrono::milliseconds()) {
*out++ = '.'; *out++ = '.';
write(ms.count(), 3); write(to_int(ms.count()), 3);
} }
} }
}; };