mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-10 05:10:05 +00:00
Simplify format_handler
This commit is contained in:
parent
58c6f8c7f5
commit
8e700619b7
@ -2663,7 +2663,7 @@ class arg_formatter : public internal::arg_formatter_base<Range> {
|
||||
/** Formats an argument of a user-defined type. */
|
||||
iterator operator()(typename basic_format_arg<context_type>::handle handle) {
|
||||
handle.format(*parse_ctx_, ctx_);
|
||||
return this->out();
|
||||
return ctx_.out();
|
||||
}
|
||||
};
|
||||
|
||||
@ -3207,10 +3207,8 @@ struct format_handler : internal::error_handler {
|
||||
|
||||
void on_replacement_field(const Char* p) {
|
||||
advance_to(parse_context, p);
|
||||
internal::custom_formatter<Context> f(parse_context, context);
|
||||
if (!visit_format_arg(f, arg))
|
||||
context.advance_to(
|
||||
visit_format_arg(ArgFormatter(context, &parse_context), arg));
|
||||
context.advance_to(
|
||||
visit_format_arg(ArgFormatter(context, &parse_context), arg));
|
||||
}
|
||||
|
||||
const Char* on_format_specs(const Char* begin, const Char* end) {
|
||||
|
Loading…
Reference in New Issue
Block a user