commit | 9cb4eca59663a238541d5660fccef341014cc0c3 | [log] [tgz] |
---|---|---|
author | Dmitry-Me <wipedout@yandex.ru> | Thu Aug 18 18:10:59 2016 +0300 |
committer | Dmitry-Me <wipedout@yandex.ru> | Thu Aug 18 18:10:59 2016 +0300 |
tree | 157b55e839f34fce0a39306fac373bbc7bd87d9c | |
parent | 0bb590196175b10e33ca4b8989966b5dfbb074d7 [diff] [blame] |
Reuse DeleteChild()
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 9ef7bc4..b181b67 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -760,11 +760,7 @@ { while( _firstChild ) { TIXMLASSERT( _lastChild ); - TIXMLASSERT( _firstChild->_document == _document ); - XMLNode* node = _firstChild; - Unlink( node ); - - DeleteNode( node ); + DeleteChild( _firstChild ); } _firstChild = _lastChild = 0; }