MCPcopy Create free account
hub / github.com/JayXon/Leanify / InsertAfterChild

Method InsertAfterChild

lib/tinyxml2/tinyxml2.cpp:765–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763
764
765XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )
766{
767 TIXMLASSERT( addThis );
768 if ( addThis->_document != _document ) {
769 TIXMLASSERT( false );
770 return 0;
771 }
772
773 TIXMLASSERT( afterThis );
774
775 if ( afterThis->_parent != this ) {
776 TIXMLASSERT( false );
777 return 0;
778 }
779
780 if ( afterThis->_next == 0 ) {
781 // The last node or the only node.
782 return InsertEndChild( addThis );
783 }
784 InsertChildPreamble( addThis );
785 addThis->_prev = afterThis;
786 addThis->_next = afterThis->_next;
787 afterThis->_next->_prev = addThis;
788 afterThis->_next = addThis;
789 addThis->_parent = this;
790 return addThis;
791}
792
793
794

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected