Skip to content

Commit

Permalink
address the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zivshek committed Apr 1, 2024
1 parent d61d9fb commit dd52233
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -2114,10 +2114,10 @@ struct formatter<weekday, Char> : private formatter<std::tm, Char> {
auto it = ctx.begin(), end = ctx.end();
if (it != end && *it == 'L') {
++it;
localized_ = true;
use_tm_formatter_ = localized_ = true;
return it;
}
auto empty = (it == end || *it == '}');
use_tm_formatter_ = !empty && !localized_;
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
}

Expand All @@ -2144,7 +2144,7 @@ struct formatter<day, Char> : private formatter<std::tm, Char> {
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
use_tm_formatter_ = (it != end && *it != '}');
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
}

Expand Down Expand Up @@ -2174,10 +2174,10 @@ struct formatter<month, Char> : private formatter<std::tm, Char> {
auto it = ctx.begin(), end = ctx.end();
if (it != end && *it == 'L') {
++it;
localized_ = true;
use_tm_formatter_ = localized_ = true;
return it;
}
auto empty = (it == end || *it == '}');
use_tm_formatter_ = !empty && !localized_;
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
}

Expand All @@ -2204,7 +2204,7 @@ struct formatter<year, Char> : private formatter<std::tm, Char> {
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
use_tm_formatter_ = (it != end && *it != '}');
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
}

Expand All @@ -2231,7 +2231,7 @@ struct formatter<year_month_day, Char> : private formatter<std::tm, Char> {
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
use_tm_formatter_ = (it != end && *it != '}');
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
}

Expand Down

0 comments on commit dd52233

Please sign in to comment.