Streamline conditions with else if
This commit is contained in:
parent
6749789ec4
commit
e9d17a045e
@ -3493,20 +3493,17 @@ PUGI_IMPL_NS_BEGIN
|
|||||||
{
|
{
|
||||||
cursor->value = parsed_pcdata; // Save the offset.
|
cursor->value = parsed_pcdata; // Save the offset.
|
||||||
}
|
}
|
||||||
|
else if (PUGI_IMPL_OPTSET(parse_merge_pcdata) && cursor->first_child && PUGI_IMPL_NODETYPE(cursor->first_child->prev_sibling_c) == node_pcdata)
|
||||||
|
{
|
||||||
|
strconcat(cursor->first_child->prev_sibling_c->value, parsed_pcdata); // Append PCDATA to the previous one.
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (PUGI_IMPL_OPTSET(parse_merge_pcdata) && cursor->first_child && PUGI_IMPL_NODETYPE(cursor->first_child->prev_sibling_c) == node_pcdata)
|
PUGI_IMPL_PUSHNODE(node_pcdata); // Append a new node on the tree.
|
||||||
{
|
|
||||||
strconcat(cursor->first_child->prev_sibling_c->value, parsed_pcdata); // Append PCDATA to the previous one.
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PUGI_IMPL_PUSHNODE(node_pcdata); // Append a new node on the tree.
|
|
||||||
|
|
||||||
cursor->value = parsed_pcdata; // Save the offset.
|
|
||||||
|
|
||||||
PUGI_IMPL_POPNODE(); // Pop since this is a standalone.
|
cursor->value = parsed_pcdata; // Save the offset.
|
||||||
}
|
|
||||||
|
PUGI_IMPL_POPNODE(); // Pop since this is a standalone.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!*s) break;
|
if (!*s) break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user