Unlinked nodes assertions

This commit is contained in:
Dmitry-Me 2017-06-15 12:44:27 +03:00
parent e84f68a68a
commit c2f677b05e
2 changed files with 3 additions and 2 deletions

View File

@ -1994,6 +1994,7 @@ XMLDocument::~XMLDocument()
void XMLDocument::MarkInUse(XMLNode* node)
{
TIXMLASSERT(node);
TIXMLASSERT(node->_parent == 0);
for (int i = 0; i < _unlinked.Size(); ++i) {

View File

@ -265,8 +265,8 @@ public:
}
void SwapRemove(int i) {
TIXMLASSERT(i >= 0);
TIXMLASSERT(i < _size);
TIXMLASSERT(i >= 0 && i < _size);
TIXMLASSERT(_size > 0);
_mem[i] = _mem[_size - 1];
--_size;
}