| 3723 | } |
| 3724 | |
| 3725 | PUGI__FN bool allow_move(xml_node parent, xml_node child) |
| 3726 | { |
| 3727 | // check that child can be a child of parent |
| 3728 | if (!allow_insert_child(parent.type(), child.type())) |
| 3729 | return false; |
| 3730 | |
| 3731 | // check that node is not moved between documents |
| 3732 | if (parent.root() != child.root()) |
| 3733 | return false; |
| 3734 | |
| 3735 | // check that new parent is not in the child subtree |
| 3736 | xml_node cur = parent; |
| 3737 | |
| 3738 | while (cur) |
| 3739 | { |
| 3740 | if (cur == child) |
| 3741 | return false; |
| 3742 | |
| 3743 | cur = cur.parent(); |
| 3744 | } |
| 3745 | |
| 3746 | return true; |
| 3747 | } |
| 3748 | |
| 3749 | PUGI__FN void node_copy_string(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char_t* source, uintptr_t& source_header, xml_allocator* alloc) |
| 3750 | { |
no test coverage detected