Streamline conditions with else if

This commit is contained in:
Arseny Kapoulkine 2023-08-26 08:35:40 -07:00
parent 6749789ec4
commit e9d17a045e

View File

@ -3493,9 +3493,7 @@ PUGI_IMPL_NS_BEGIN
{ {
cursor->value = parsed_pcdata; // Save the offset. cursor->value = parsed_pcdata; // Save the offset.
} }
else else if (PUGI_IMPL_OPTSET(parse_merge_pcdata) && cursor->first_child && PUGI_IMPL_NODETYPE(cursor->first_child->prev_sibling_c) == node_pcdata)
{
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. strconcat(cursor->first_child->prev_sibling_c->value, parsed_pcdata); // Append PCDATA to the previous one.
} }
@ -3507,7 +3505,6 @@ PUGI_IMPL_NS_BEGIN
PUGI_IMPL_POPNODE(); // Pop since this is a standalone. PUGI_IMPL_POPNODE(); // Pop since this is a standalone.
} }
}
if (!*s) break; if (!*s) break;
} }