MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / Unlink

Method Unlink

externals/tinyxml2/tinyxml2.cpp:888–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

886
887
888void XMLNode::Unlink( XMLNode* child )
889{
890 TIXMLASSERT( child );
891 TIXMLASSERT( child->_document == _document );
892 TIXMLASSERT( child->_parent == this );
893 if ( child == _firstChild ) {
894 _firstChild = _firstChild->_next;
895 }
896 if ( child == _lastChild ) {
897 _lastChild = _lastChild->_prev;
898 }
899
900 if ( child->_prev ) {
901 child->_prev->_next = child->_next;
902 }
903 if ( child->_next ) {
904 child->_next->_prev = child->_prev;
905 }
906 child->_next = 0;
907 child->_prev = 0;
908 child->_parent = 0;
909}
910
911
912void XMLNode::DeleteChild( XMLNode* node )

Callers 2

~XMLNodeMethod · 0.80
InsertChildPreambleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected