Skip to content

Commit

Permalink
Fix: Warning for shadowed variables (#3188) (#3193)
Browse files Browse the repository at this point in the history
* Rename variable count to resolve shadowing (#3188)

* Amalgamate: Rename variable count to resolve shadowing (#3188)

Co-authored-by: Maarten Becker <maarten.becker@nuc-eng.com>
  • Loading branch information
kernie and Maarten Becker authored Dec 17, 2021
1 parent 7603046 commit 825d323
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1278,15 +1278,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
#endif
}

iterator set_parents(iterator it, typename iterator::difference_type count)
iterator set_parents(iterator it, typename iterator::difference_type count_set_parents)
{
#if JSON_DIAGNOSTICS
for (typename iterator::difference_type i = 0; i < count; ++i)
for (typename iterator::difference_type i = 0; i < count_set_parents; ++i)
{
(it + i)->m_parent = this;
}
#else
static_cast<void>(count);
static_cast<void>(count_set_parents);
#endif
return it;
}
Expand Down
6 changes: 3 additions & 3 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18818,15 +18818,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
#endif
}

iterator set_parents(iterator it, typename iterator::difference_type count)
iterator set_parents(iterator it, typename iterator::difference_type count_set_parents)
{
#if JSON_DIAGNOSTICS
for (typename iterator::difference_type i = 0; i < count; ++i)
for (typename iterator::difference_type i = 0; i < count_set_parents; ++i)
{
(it + i)->m_parent = this;
}
#else
static_cast<void>(count);
static_cast<void>(count_set_parents);
#endif
return it;
}
Expand Down

0 comments on commit 825d323

Please sign in to comment.