From 3c114d091b6dc7ea978be8d87323af62b9c1db5b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 1 May 2020 07:00:25 -0700 Subject: [PATCH] Fix a shadowing warning (#1658) --- include/fmt/printf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index f7eb28c8..ed84f1b2 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -504,10 +504,10 @@ OutputIt basic_printf_context::format() { format_arg arg = get_arg(arg_index); if (specs.precision >= 0 && arg.type() == internal::type::cstring_type) { auto str = visit_format_arg(internal::get_cstring(), arg); - auto end = str + specs.precision; - auto nul = std::find(str, end, Char()); + auto str_end = str + specs.precision; + auto nul = std::find(str, str_end, Char()); arg = internal::make_arg(basic_string_view( - str, nul != end ? nul - str : specs.precision)); + str, nul != str_end ? nul - str : specs.precision)); } if (specs.alt && visit_format_arg(internal::is_zero_int(), arg)) specs.alt = false;