From b704527abe05c9e42194ad2c3e26fedfc859700d Mon Sep 17 00:00:00 2001 From: WANG Lei Date: Wed, 2 Dec 2020 18:12:41 +0800 Subject: [PATCH] fix shadow warning When compiling using "-Wshadow", it shows ``` spdlog/fmt/bundled/format.h:1601:11: error: declaration shadows a type alias in 'int_writer' [-Werror,-Wshadow] using iterator = remove_reference_t; ^ spdlog/fmt/bundled/format.h:1490:9: note: previous declaration is here using iterator = ^ ``` --- include/spdlog/fmt/bundled/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index 17509b7b..b6959235 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1621,8 +1621,8 @@ OutputIt write_nonfinite(OutputIt out, bool isinf, constexpr size_t str_size = 3; auto sign = fspecs.sign; auto size = str_size + (sign ? 1 : 0); - using iterator = remove_reference_t; - return write_padded(out, specs, size, [=](iterator it) { + using pad_iterator = remove_reference_t; + return write_padded(out, specs, size, [=](pad_iterator it) { if (sign) *it++ = static_cast(data::signs[sign]); return copy_str(str, str + str_size, it); });