mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-29 00:35:03 +00:00
Simplify on_text
This commit is contained in:
parent
b5dac0f0f8
commit
60dc273513
@ -3089,9 +3089,8 @@ struct format_handler : detail::error_handler {
|
|||||||
: parse_context(str), context(out, format_args, loc) {}
|
: parse_context(str), context(out, format_args, loc) {}
|
||||||
|
|
||||||
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 text = basic_string_view<Char>(begin, to_unsigned(end - begin));
|
||||||
auto out = context.out();
|
context.advance_to(write<Char>(context.out(), text));
|
||||||
context.advance_to(write<Char>(out, basic_string_view<Char>(begin, size)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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