Commit 948f98cf authored by Isaac Nickaein's avatar Isaac Nickaein

Cleanups

Make our intent more clear in destruction
parent 0f3ec003
...@@ -1035,9 +1035,12 @@ class basic_json ...@@ -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 ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment