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

Method InsertFirstChild

sourcecommon/tinyxml2.cpp:669–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667
668
669XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
670{
671 if (addThis->_document != _document)
672 return 0;
673
674 if (addThis->_parent)
675 addThis->_parent->Unlink( addThis );
676 else
677 addThis->_memPool->SetTracked();
678
679 if ( _firstChild ) {
680 TIXMLASSERT( _lastChild );
681 TIXMLASSERT( _firstChild->_prev == 0 );
682
683 _firstChild->_prev = addThis;
684 addThis->_next = _firstChild;
685 _firstChild = addThis;
686
687 addThis->_prev = 0;
688 }
689 else {
690 TIXMLASSERT( _lastChild == 0 );
691 _firstChild = _lastChild = addThis;
692
693 addThis->_prev = 0;
694 addThis->_next = 0;
695 }
696 addThis->_parent = this;
697 return addThis;
698}
699
700
701XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )

Callers

nothing calls this directly

Calls 2

UnlinkMethod · 0.80
SetTrackedMethod · 0.80

Tested by

no test coverage detected