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

Method InsertFirstChild

src/xml/tinyxml2.cpp:679–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677
678
679XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis ) {
680 TIXMLASSERT( addThis );
681 if ( addThis->_document != _document ) {
682 TIXMLASSERT( false );
683 return 0;
684 }
685 InsertChildPreamble( addThis );
686
687 if ( _firstChild ) {
688 TIXMLASSERT( _lastChild );
689 TIXMLASSERT( _firstChild->_prev == 0 );
690
691 _firstChild->_prev = addThis;
692 addThis->_next = _firstChild;
693 _firstChild = addThis;
694
695 addThis->_prev = 0;
696 } else {
697 TIXMLASSERT( _lastChild == 0 );
698 _firstChild = _lastChild = addThis;
699
700 addThis->_prev = 0;
701 addThis->_next = 0;
702 }
703 addThis->_parent = this;
704 return addThis;
705}
706
707
708XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected