Silence misc-const-correctness for patch_aliases_this
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+2
No files matched your search
@@ -6953,6 +6953,7 @@ public:
|
|||||||
// the operations below change *this while iterating json_patch: apply
|
// the operations below change *this while iterating json_patch: apply
|
||||||
// a copy when a value is applied as patch to itself or, with
|
// a copy when a value is applied as patch to itself or, with
|
||||||
// JSON_DIAGNOSTICS, to a value stored inside it
|
// JSON_DIAGNOSTICS, to a value stored inside it
|
||||||
|
// NOLINTNEXTLINE(misc-const-correctness): only the JSON_DIAGNOSTICS build modifies it
|
||||||
bool patch_aliases_this = (&json_patch == this);
|
bool patch_aliases_this = (&json_patch == this);
|
||||||
#if JSON_DIAGNOSTICS
|
#if JSON_DIAGNOSTICS
|
||||||
for (const basic_json* p = json_patch.m_parent; !patch_aliases_this && p != nullptr; p = p->m_parent)
|
for (const basic_json* p = json_patch.m_parent; !patch_aliases_this && p != nullptr; p = p->m_parent)
|
||||||
|
|||||||
Generated
+1
@@ -43711,6 +43711,7 @@ public:
|
|||||||
// the operations below change *this while iterating json_patch: apply
|
// the operations below change *this while iterating json_patch: apply
|
||||||
// a copy when a value is applied as patch to itself or, with
|
// a copy when a value is applied as patch to itself or, with
|
||||||
// JSON_DIAGNOSTICS, to a value stored inside it
|
// JSON_DIAGNOSTICS, to a value stored inside it
|
||||||
|
// NOLINTNEXTLINE(misc-const-correctness): only the JSON_DIAGNOSTICS build modifies it
|
||||||
bool patch_aliases_this = (&json_patch == this);
|
bool patch_aliases_this = (&json_patch == this);
|
||||||
#if JSON_DIAGNOSTICS
|
#if JSON_DIAGNOSTICS
|
||||||
for (const basic_json* p = json_patch.m_parent; !patch_aliases_this && p != nullptr; p = p->m_parent)
|
for (const basic_json* p = json_patch.m_parent; !patch_aliases_this && p != nullptr; p = p->m_parent)
|
||||||
|
|||||||
Reference in new issue
Block a user