From d949a388f035d196acb71b381816e6d557fe733b Mon Sep 17 00:00:00 2001 From: sunmy <7743179+sun_mengyue@user.noreply.gitee.com> Date: Fri, 11 Jun 2021 22:26:03 +0800 Subject: [PATCH] remove magic constant 17 --- include/fmt/chrono.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 77a7a37f..ad15be74 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -451,7 +451,9 @@ FMT_END_DETAIL_NAMESPACE template struct formatter, Char> : formatter { - FMT_CONSTEXPR formatter() { this->specs = {default_specs, 17}; } + FMT_CONSTEXPR formatter() { + this->specs = {default_specs, sizeof(default_specs) / sizeof(Char)}; + } template FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {