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

Method remove_first_node

include/cereal/external/rapidxml/rapidxml.hpp:1153–1163  ·  view source on GitHub ↗

Removes first child 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

1151 //! If node has no children, behaviour is undefined.
1152 //! Use first_node() to test if node has children.
1153 void remove_first_node()
1154 {
1155 assert(first_node());
1156 xml_node<Ch> *child = m_first_node;
1157 m_first_node = child->m_next_sibling;
1158 if (child->m_next_sibling)
1159 child->m_next_sibling->m_prev_sibling = 0;
1160 else
1161 m_last_node = 0;
1162 child->m_parent = 0;
1163 }
1164
1165 //! Removes last child of the node.
1166 //! If node has no children, behaviour is undefined.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected