MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / InsertAfterChild

Method InsertAfterChild

sourcecommon/tinyxml2.cpp:701–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699
700
701XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )
702{
703 if (addThis->_document != _document)
704 return 0;
705
706 TIXMLASSERT( afterThis->_parent == this );
707
708 if ( afterThis->_parent != this ) {
709 return 0;
710 }
711
712 if ( afterThis->_next == 0 ) {
713 // The last node or the only node.
714 return InsertEndChild( addThis );
715 }
716 if (addThis->_parent)
717 addThis->_parent->Unlink( addThis );
718 else
719 addThis->_memPool->SetTracked();
720 addThis->_prev = afterThis;
721 addThis->_next = afterThis->_next;
722 afterThis->_next->_prev = addThis;
723 afterThis->_next = addThis;
724 addThis->_parent = this;
725 return addThis;
726}
727
728
729

Callers

nothing calls this directly

Calls 2

UnlinkMethod · 0.80
SetTrackedMethod · 0.80

Tested by

no test coverage detected