1
0
mirror of https://github.com/nlohmann/json synced 2024-11-22 12:00:05 +00:00

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

* 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>
This commit is contained in:
Maarten Becker 2021-12-17 07:24:59 +01:00 committed by GitHub
parent 760304635d
commit 825d3230d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}