Reuse DeleteChild()

This commit is contained in:
Dmitry-Me 2016-08-18 18:10:59 +03:00
parent 0bb5901961
commit 9cb4eca596
1 changed files with 1 additions and 5 deletions

View File

@ -760,11 +760,7 @@ void XMLNode::DeleteChildren()
{ {
while( _firstChild ) { while( _firstChild ) {
TIXMLASSERT( _lastChild ); TIXMLASSERT( _lastChild );
TIXMLASSERT( _firstChild->_document == _document ); DeleteChild( _firstChild );
XMLNode* node = _firstChild;
Unlink( node );
DeleteNode( node );
} }
_firstChild = _lastChild = 0; _firstChild = _lastChild = 0;
} }