Skip to content

Commit

Permalink
Remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Dec 30, 2022
1 parent 739b600 commit 0c3dd5d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -2860,10 +2860,9 @@ struct formatter<T, Char,
public:
template <typename ParseContext>
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> const Char* {
auto begin = ctx.begin(), end = ctx.end();
if (begin == end) return begin;
auto type = detail::type_constant<T, Char>::value;
begin = detail::parse_format_specs(begin, end, specs_, ctx, type);
auto end =
detail::parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx, type);
auto eh = detail::error_handler();
switch (type) {
case detail::type::none_type:
Expand Down Expand Up @@ -2916,7 +2915,7 @@ struct formatter<T, Char,
detail::check_pointer_type_spec(specs_.type, eh);
break;
}
return begin;
return end;
}

template <detail::type U = detail::type_constant<T, Char>::value,
Expand Down

0 comments on commit 0c3dd5d

Please sign in to comment.