From bc23505c54a1017282af18e12149d18b4789214b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 23 Mar 2021 13:39:31 +0100 Subject: [PATCH] :rotating_light: fix warning --- include/nlohmann/json.hpp | 1 + single_include/nlohmann/json.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index a2da4b4d9..cf3908949 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -1247,6 +1247,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr); #if JSON_DIAGNOSTICS + // cppcheck-suppress assertWithSideEffect JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j) { return j.m_parent == this; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5724dbb2b..def56bb87 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -18060,6 +18060,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr); #if JSON_DIAGNOSTICS + // cppcheck-suppress assertWithSideEffect JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j) { return j.m_parent == this;