From 5619e8757c24fb2d6759efb4c7d7b056bc67138f Mon Sep 17 00:00:00 2001 From: matrackif Date: Sat, 4 Dec 2021 17:50:13 +0100 Subject: [PATCH] Format chrono.h with clang-format --- include/fmt/chrono.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 21b940d9..3b1c0fc5 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1393,8 +1393,7 @@ template class subsecond_helper { /// Returns the amount of digits according to the c++ 20 spec /// In the range [0, 18], if more than 18 fractional digits are required, /// then we return 6 for microseconds precision - static constexpr int num_digits(std::intmax_t num, - std::intmax_t den, + static constexpr int num_digits(std::intmax_t num, std::intmax_t den, int n = 0) { return num % den == 0 ? n : (n > 18 ? 6 : num_digits(num * 10, den, n + 1)); } @@ -1589,8 +1588,7 @@ struct chrono_formatter { } } - template - void write(RepType value, int width) { + template void write(RepType value, int width) { write_sign(); if (isnan(value)) return write_nan(); uint32_or_64_or_128_t n = @@ -1683,7 +1681,8 @@ struct chrono_formatter { if (std::ratio_less::value) { *out++ = '.'; - write(subsec_helper::get_subseconds(duration_rep{val}), subsec_helper::fractional_width); + write(subsec_helper::get_subseconds(duration_rep{val}), + subsec_helper::fractional_width); } return; }