From 91a9f960047a40067aeca7d8595109d401c38b30 Mon Sep 17 00:00:00 2001 From: rbrugo Date: Mon, 7 Mar 2022 19:40:54 +0100 Subject: [PATCH] Move const before auto --- include/fmt/color.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index fb8af902..0c25bf4f 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -493,7 +493,7 @@ template inline void reset_color(buffer& buffer) { } template struct styled_arg { - FMT_CONSTEXPR styled_arg(Arg const& format_argument, text_style format_style) + FMT_CONSTEXPR styled_arg(const Arg& format_argument, text_style format_style) : argument(format_argument), style(format_style) {} const Arg& argument; @@ -641,10 +641,10 @@ inline auto format_to(OutputIt out, const text_style& ts, const S& format_str, template struct formatter, Char> : formatter { template - auto format(detail::styled_arg const& arg, FormatContext& ctx) const + auto format(const detail::styled_arg& arg, FormatContext& ctx) const -> decltype(ctx.out()) { - auto const& ts = arg.style; - auto const& value = arg.argument; + const auto& ts = arg.style; + const auto& value = arg.argument; auto out = ctx.out(); using detail::get_buffer;