MCPcopy Create free account
hub / github.com/USCiLab/cereal / remove_last_node

Method remove_last_node

include/cereal/external/rapidxml/rapidxml.hpp:1168–1180  ·  view source on GitHub ↗

Removes last child of the node. If node has no children, behaviour is undefined. Use first_node() to test if node has children.

Source from the content-addressed store, hash-verified

1166 //! If node has no children, behaviour is undefined.
1167 //! Use first_node() to test if node has children.
1168 void remove_last_node()
1169 {
1170 assert(first_node());
1171 xml_node<Ch> *child = m_last_node;
1172 if (child->m_prev_sibling)
1173 {
1174 m_last_node = child->m_prev_sibling;
1175 child->m_prev_sibling->m_next_sibling = 0;
1176 }
1177 else
1178 m_first_node = 0;
1179 child->m_parent = 0;
1180 }
1181
1182 //! Removes specified child from the node
1183 // \param where Pointer to child to be removed.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected