From a95dc17017611498476f9929866904e23192ced4 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Fri, 29 Jul 2022 22:41:43 +0500 Subject: [PATCH] Remove unused condition Signed-off-by: Vladislav Shchapov --- include/fmt/chrono.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 4a2c3a3d..7fa368f3 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2008,7 +2008,7 @@ struct formatter, template FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) { - return this->do_parse(ctx.begin(), ctx.end(), true); + return this->do_parse(ctx.begin(), ctx.end()); } template @@ -2039,13 +2039,10 @@ template struct formatter { basic_string_view specs; protected: - template - FMT_CONSTEXPR auto do_parse(It begin, It end, bool with_default = false) - -> It { + template FMT_CONSTEXPR auto do_parse(It begin, It end) -> It { if (begin != end && *begin == ':') ++begin; end = detail::parse_chrono_format(begin, end, detail::tm_format_checker()); - if (!with_default || end != begin) - specs = {begin, detail::to_unsigned(end - begin)}; + if (end != begin) specs = {begin, detail::to_unsigned(end - begin)}; // basic_string_view<>::compare isn't constexpr before C++17. if (specs.size() == 2 && specs[0] == Char('%')) { if (specs[1] == Char('F'))