Skip to content

Commit

Permalink
Simplify on_text
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Nov 11, 2020
1 parent b5dac0f commit 60dc273
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -3089,9 +3089,8 @@ struct format_handler : detail::error_handler {
: parse_context(str), context(out, format_args, loc) {}

void on_text(const Char* begin, const Char* end) {
auto size = to_unsigned(end - begin);
auto out = context.out();
context.advance_to(write<Char>(out, basic_string_view<Char>(begin, size)));
auto text = basic_string_view<Char>(begin, to_unsigned(end - begin));
context.advance_to(write<Char>(context.out(), text));
}

int on_arg_id() { return parse_context.next_arg_id(); }
Expand Down

0 comments on commit 60dc273

Please sign in to comment.