mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 03:21:34 +00:00
Optimize handling of large format strings
This commit is contained in:
parent
1936dddc3c
commit
beb248b6ac
@ -3070,9 +3070,7 @@ struct format_handler : detail::error_handler {
|
|||||||
void on_text(const Char* begin, const Char* end) {
|
void on_text(const Char* begin, const Char* end) {
|
||||||
auto size = to_unsigned(end - begin);
|
auto size = to_unsigned(end - begin);
|
||||||
auto out = context.out();
|
auto out = context.out();
|
||||||
auto&& it = reserve(out, size);
|
context.advance_to(write<Char>(out, basic_string_view<Char>(begin, size)));
|
||||||
it = std::copy_n(begin, size, it);
|
|
||||||
context.advance_to(out);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int on_arg_id() { return parse_context.next_arg_id(); }
|
int on_arg_id() { return parse_context.next_arg_id(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user