| 849 | } |
| 850 | |
| 851 | void XMLNode::Unlink(XMLNode* child) |
| 852 | { |
| 853 | TIXMLASSERT(child); |
| 854 | TIXMLASSERT(child->_document == _document); |
| 855 | TIXMLASSERT(child->_parent == this); |
| 856 | if (child == _firstChild) |
| 857 | { |
| 858 | _firstChild = _firstChild->_next; |
| 859 | } |
| 860 | if (child == _lastChild) |
| 861 | { |
| 862 | _lastChild = _lastChild->_prev; |
| 863 | } |
| 864 | |
| 865 | if (child->_prev) |
| 866 | { |
| 867 | child->_prev->_next = child->_next; |
| 868 | } |
| 869 | if (child->_next) |
| 870 | { |
| 871 | child->_next->_prev = child->_prev; |
| 872 | } |
| 873 | child->_next = 0; |
| 874 | child->_prev = 0; |
| 875 | child->_parent = 0; |
| 876 | } |
| 877 | |
| 878 | void XMLNode::DeleteChild(XMLNode* node) |
| 879 | { |
no outgoing calls
no test coverage detected