MCPcopy Create free account
hub / github.com/DarthTon/Xenos / remove_first_node

Method remove_first_node

src/rapidxml/rapidxml.hpp:1154–1164  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected