From bdc45eef76c861642d0c326ce1c80169c5747ca5 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 21 Jul 2024 08:31:03 -0700 Subject: [PATCH] Simplify on_text --- include/fmt/format.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 67f0ab73..a84fc717 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4237,8 +4237,7 @@ void vformat_to(buffer& buf, basic_string_view fmt, : parse_context(str), context(p_out, p_args, p_loc) {} void on_text(const Char* begin, const Char* end) { - auto text = basic_string_view(begin, to_unsigned(end - begin)); - context.advance_to(write(context.out(), text)); + context.advance_to(copy_noinline(begin, end, context.out())); } FMT_CONSTEXPR auto on_arg_id() -> int {