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

Method InsertFirstChild

lib/tinyxml2/tinyxml2.cpp:734–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732
733
734XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
735{
736 TIXMLASSERT( addThis );
737 if ( addThis->_document != _document ) {
738 TIXMLASSERT( false );
739 return 0;
740 }
741 InsertChildPreamble( addThis );
742
743 if ( _firstChild ) {
744 TIXMLASSERT( _lastChild );
745 TIXMLASSERT( _firstChild->_prev == 0 );
746
747 _firstChild->_prev = addThis;
748 addThis->_next = _firstChild;
749 _firstChild = addThis;
750
751 addThis->_prev = 0;
752 }
753 else {
754 TIXMLASSERT( _lastChild == 0 );
755 _firstChild = _lastChild = addThis;
756
757 addThis->_prev = 0;
758 addThis->_next = 0;
759 }
760 addThis->_parent = this;
761 return addThis;
762}
763
764
765XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected