mirror of
https://github.com/nlohmann/json.git
synced 2026-09-27 18:20:32 +00:00
Note that the diff frame reference is invalidated by pop_back() too
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -6482,6 +6482,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
enter(source, target);
|
||||
while (!stack.empty())
|
||||
{
|
||||
// invalidated when enter() pushes a frame and by the pop_back()
|
||||
// at the end, so not used after either
|
||||
diff_frame& frame = stack.back();
|
||||
const std::size_t path_length = frame.path_length;
|
||||
const std::size_t depth = stack.size();
|
||||
|
||||
@@ -31440,6 +31440,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
enter(source, target);
|
||||
while (!stack.empty())
|
||||
{
|
||||
// invalidated when enter() pushes a frame and by the pop_back()
|
||||
// at the end, so not used after either
|
||||
diff_frame& frame = stack.back();
|
||||
const std::size_t path_length = frame.path_length;
|
||||
const std::size_t depth = stack.size();
|
||||
|
||||
Reference in New Issue
Block a user