Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Warning for shadowed variables (#3188) #3193

Merged
merged 2 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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