🔨 cleanup
This commit is contained in:
parent
606a25195f
commit
375b05a17d
2 changed files with 32 additions and 20 deletions
|
@ -277,17 +277,23 @@ class json_sax_dom_parser : public json_sax<BasicJsonType>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(ref_stack.back()->is_array() or ref_stack.back()->is_object());
|
switch (ref_stack.back()->m_type)
|
||||||
if (ref_stack.back()->is_array())
|
|
||||||
{
|
{
|
||||||
ref_stack.back()->m_value.array->push_back(BasicJsonType(std::forward<Value>(v)));
|
case value_t::array:
|
||||||
return &(ref_stack.back()->m_value.array->back());
|
{
|
||||||
}
|
ref_stack.back()->m_value.array->push_back(BasicJsonType(std::forward<Value>(v)));
|
||||||
else
|
return &(ref_stack.back()->m_value.array->back());
|
||||||
{
|
}
|
||||||
assert(object_element);
|
|
||||||
*object_element = BasicJsonType(std::forward<Value>(v));
|
case value_t::object:
|
||||||
return object_element;
|
{
|
||||||
|
assert(object_element);
|
||||||
|
*object_element = BasicJsonType(std::forward<Value>(v));
|
||||||
|
return object_element;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
assert(false); // LCOV_EXCL_LINE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3413,17 +3413,23 @@ class json_sax_dom_parser : public json_sax<BasicJsonType>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(ref_stack.back()->is_array() or ref_stack.back()->is_object());
|
switch (ref_stack.back()->m_type)
|
||||||
if (ref_stack.back()->is_array())
|
|
||||||
{
|
{
|
||||||
ref_stack.back()->m_value.array->push_back(BasicJsonType(std::forward<Value>(v)));
|
case value_t::array:
|
||||||
return &(ref_stack.back()->m_value.array->back());
|
{
|
||||||
}
|
ref_stack.back()->m_value.array->push_back(BasicJsonType(std::forward<Value>(v)));
|
||||||
else
|
return &(ref_stack.back()->m_value.array->back());
|
||||||
{
|
}
|
||||||
assert(object_element);
|
|
||||||
*object_element = BasicJsonType(std::forward<Value>(v));
|
case value_t::object:
|
||||||
return object_element;
|
{
|
||||||
|
assert(object_element);
|
||||||
|
*object_element = BasicJsonType(std::forward<Value>(v));
|
||||||
|
return object_element;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
assert(false); // LCOV_EXCL_LINE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue