🚨 fix warning
This commit is contained in:
parent
5306eef150
commit
4428121ec7
@ -1239,7 +1239,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
during destruction of objects when the invariant does not
|
during destruction of objects when the invariant does not
|
||||||
need to hold.
|
need to hold.
|
||||||
*/
|
*/
|
||||||
void assert_invariant(bool check_parents = true) const noexcept
|
void assert_invariant(bool check_parents = true) const noexcept try
|
||||||
{
|
{
|
||||||
JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr);
|
JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr);
|
||||||
JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr);
|
JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr);
|
||||||
@ -1247,18 +1247,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
|
JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
|
||||||
|
|
||||||
#if JSON_DIAGNOSTICS
|
#if JSON_DIAGNOSTICS
|
||||||
try
|
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
|
||||||
{
|
{
|
||||||
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
|
return j.m_parent == this;
|
||||||
{
|
}));
|
||||||
return j.m_parent == this;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
catch (...) {}
|
|
||||||
#else
|
#else
|
||||||
static_cast<void>(check_parents);
|
static_cast<void>(check_parents);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
catch (...) {}
|
||||||
|
|
||||||
void set_parents()
|
void set_parents()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18052,7 +18052,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
during destruction of objects when the invariant does not
|
during destruction of objects when the invariant does not
|
||||||
need to hold.
|
need to hold.
|
||||||
*/
|
*/
|
||||||
void assert_invariant(bool check_parents = true) const noexcept
|
void assert_invariant(bool check_parents = true) const noexcept try
|
||||||
{
|
{
|
||||||
JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr);
|
JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr);
|
||||||
JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr);
|
JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr);
|
||||||
@ -18060,18 +18060,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
|
JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
|
||||||
|
|
||||||
#if JSON_DIAGNOSTICS
|
#if JSON_DIAGNOSTICS
|
||||||
try
|
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
|
||||||
{
|
{
|
||||||
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
|
return j.m_parent == this;
|
||||||
{
|
}));
|
||||||
return j.m_parent == this;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
catch (...) {}
|
|
||||||
#else
|
#else
|
||||||
static_cast<void>(check_parents);
|
static_cast<void>(check_parents);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
catch (...) {}
|
||||||
|
|
||||||
void set_parents()
|
void set_parents()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user