MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / InsertAfterChild

Method InsertAfterChild

src/xml/tinyxml2.cpp:708–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706
707
708XMLNode* 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected