mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
Cleanups
Make our intent more clear in destruction
This commit is contained in:
@ -1035,9 +1035,12 @@ class basic_json
|
|||||||
{
|
{
|
||||||
stack.push_back(std::move(it.second));
|
stack.push_back(std::move(it.second));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_item.m_value.object->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// current_item is destroyed here
|
// it's now safe that current_item get destructed
|
||||||
|
// since it doesn't have any children
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (t)
|
switch (t)
|
||||||
|
@ -15578,9 +15578,12 @@ class basic_json
|
|||||||
{
|
{
|
||||||
stack.push_back(std::move(it.second));
|
stack.push_back(std::move(it.second));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_item.m_value.object->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// current_item is destroyed here
|
// it's now safe that current_item get destructed
|
||||||
|
// since it doesn't have any children
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (t)
|
switch (t)
|
||||||
|
Reference in New Issue
Block a user