Skip to content

Commit

Permalink
Optimize handling of large format strings
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Nov 11, 2020
1 parent 1936ddd commit beb248b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -3070,9 +3070,7 @@ struct format_handler : detail::error_handler {
void on_text(const Char* begin, const Char* end) {
auto size = to_unsigned(end - begin);
auto out = context.out();
auto&& it = reserve(out, size);
it = std::copy_n(begin, size, it);
context.advance_to(out);
context.advance_to(write<Char>(out, basic_string_view<Char>(begin, size)));
}

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

0 comments on commit beb248b

Please sign in to comment.