| 706 | |
| 707 | |
| 708 | XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ) { |
| 709 | TIXMLASSERT( addThis ); |
| 710 | if ( addThis->_document != _document ) { |
| 711 | TIXMLASSERT( false ); |
| 712 | return 0; |
| 713 | } |
| 714 | |
| 715 | TIXMLASSERT( afterThis ); |
| 716 | |
| 717 | if ( afterThis->_parent != this ) { |
| 718 | TIXMLASSERT( false ); |
| 719 | return 0; |
| 720 | } |
| 721 | |
| 722 | if ( afterThis->_next == 0 ) { |
| 723 | // The last node or the only node. |
| 724 | return InsertEndChild( addThis ); |
| 725 | } |
| 726 | InsertChildPreamble( addThis ); |
| 727 | addThis->_prev = afterThis; |
| 728 | addThis->_next = afterThis->_next; |
| 729 | afterThis->_next->_prev = addThis; |
| 730 | afterThis->_next = addThis; |
| 731 | addThis->_parent = this; |
| 732 | return addThis; |
| 733 | } |
| 734 | |
| 735 | |
| 736 |
nothing calls this directly
no outgoing calls
no test coverage detected