MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / InsertFirstChild

Method InsertFirstChild

native/thirdpart/tinyxml2/tinyxml2.cpp:925–953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923
924
925XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
926{
927 TIXMLASSERT( addThis );
928 if ( addThis->_document != _document ) {
929 TIXMLASSERT( false );
930 return 0;
931 }
932 InsertChildPreamble( addThis );
933
934 if ( _firstChild ) {
935 TIXMLASSERT( _lastChild );
936 TIXMLASSERT( _firstChild->_prev == 0 );
937
938 _firstChild->_prev = addThis;
939 addThis->_next = _firstChild;
940 _firstChild = addThis;
941
942 addThis->_prev = 0;
943 }
944 else {
945 TIXMLASSERT( _lastChild == 0 );
946 _firstChild = _lastChild = addThis;
947
948 addThis->_prev = 0;
949 addThis->_next = 0;
950 }
951 addThis->_parent = this;
952 return addThis;
953}
954
955
956XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )

Callers 2

toXMLMethod · 0.80
append_elementFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected