| 5225 | } |
| 5226 | |
| 5227 | PUGI__FN xml_node xml_node::insert_move_after(const xml_node& moved, const xml_node& node) |
| 5228 | { |
| 5229 | if (!impl::allow_move(*this, moved)) return xml_node(); |
| 5230 | if (!node._root || node._root->parent != _root) return xml_node(); |
| 5231 | if (moved._root == node._root) return xml_node(); |
| 5232 | |
| 5233 | // disable document_buffer_order optimization since moving nodes around changes document order without changing buffer pointers |
| 5234 | impl::get_document(_root).header |= impl::xml_memory_page_contents_shared_mask; |
| 5235 | |
| 5236 | impl::remove_node(moved._root); |
| 5237 | impl::insert_node_after(moved._root, node._root); |
| 5238 | |
| 5239 | return moved; |
| 5240 | } |
| 5241 | |
| 5242 | PUGI__FN xml_node xml_node::insert_move_before(const xml_node& moved, const xml_node& node) |
| 5243 | { |
nothing calls this directly
no test coverage detected