Skip to content

Commit

Permalink
Fix compile errors due to name-hiding and an unused function argument.
Browse files Browse the repository at this point in the history
These problems are pointed out by clang-tidy and fail compilation on msvc at /W4 /WX.
  • Loading branch information
DanielaE committed Jan 13, 2019
1 parent 9a777b9 commit dc9463e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/fmt/prepare.h
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion test/prepare-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ template <typename T> struct user_allocator {
return new value_type[cnt];
}

void deallocate(pointer p, size_type cnt) { delete[] p; }
void deallocate(pointer p, size_type /*cnt*/) { delete[] p; }

void construct(pointer p, const value_type &val) { new (p) value_type(val); }

Expand Down

0 comments on commit dc9463e

Please sign in to comment.