Removes last child of the node. If node has no children, behaviour is undefined. Use first_node() to test if node has children.
| 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. |
nothing calls this directly
no outgoing calls
no test coverage detected