Error checking never actually checked anything

This commit is contained in:
Dmitry-Me 2014-11-28 12:08:36 +03:00
parent 2114e47453
commit ab37df8d67
1 changed files with 4 additions and 1 deletions

View File

@ -1654,6 +1654,9 @@ void XMLDocument::Clear()
{
DeleteChildren();
#ifdef DEBUG
const bool hadError = Error();
#endif
_errorID = XML_NO_ERROR;
_errorStr1 = 0;
_errorStr2 = 0;
@ -1669,7 +1672,7 @@ void XMLDocument::Clear()
#endif
#ifdef DEBUG
if ( Error() == false ) {
if ( !hadError ) {
TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );