From e05dfb0887c873bb092cbffc851b5bd5c0ebcfe4 Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Sun, 13 Jan 2019 09:06:51 +0100 Subject: [PATCH] Fix compile errors due to name-hiding and an unused function argument. These problems are pointed out by clang-tidy and fail compilation on msvc at /W4 /WX. Signed-off-by: Daniela Engert --- include/fmt/prepare.h | 6 +++--- test/prepare-test.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fmt/prepare.h b/include/fmt/prepare.h index 2ae55a41..3569bec0 100644 --- a/include/fmt/prepare.h +++ b/include/fmt/prepare.h @@ -263,10 +263,10 @@ class prepared_format { switch (part.which) { case format_part_t::which_value::text: { const auto text = value.text.to_view(format_view); - auto out = ctx.out(); - auto&& it = internal::reserve(out, text.size()); + auto output = ctx.out(); + auto&& it = internal::reserve(output, text.size()); it = std::copy_n(text.begin(), text.size(), it); - ctx.advance_to(out); + ctx.advance_to(output); } break; case format_part_t::which_value::argument_id: { diff --git a/test/prepare-test.cc b/test/prepare-test.cc index 47a68dc4..cd8c7405 100644 --- a/test/prepare-test.cc +++ b/test/prepare-test.cc @@ -627,7 +627,7 @@ template struct user_allocator { return new value_type[cnt]; } - void deallocate(pointer p, size_type cnt) { delete[] p; } + void deallocate(pointer p, size_type) { delete[] p; } void construct(pointer p, const value_type& val) { new (p) value_type(val); }