formatting tweaks
This commit is contained in:
@@ -638,6 +638,7 @@ void XMLNode::Unlink( XMLNode* child )
|
||||
if ( child->_next ) {
|
||||
child->_next->_prev = child->_prev;
|
||||
}
|
||||
child->_parent = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -652,10 +653,12 @@ XMLNode* XMLNode::InsertEndChild( XMLNode* addThis )
|
||||
{
|
||||
if (addThis->_document != _document)
|
||||
return 0;
|
||||
|
||||
if (addThis->_parent)
|
||||
addThis->_parent->Unlink( addThis );
|
||||
else
|
||||
addThis->_memPool->SetTracked();
|
||||
|
||||
if ( _lastChild ) {
|
||||
TIXMLASSERT( _firstChild );
|
||||
TIXMLASSERT( _lastChild->_next == 0 );
|
||||
@@ -681,10 +684,12 @@ XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
|
||||
{
|
||||
if (addThis->_document != _document)
|
||||
return 0;
|
||||
|
||||
if (addThis->_parent)
|
||||
addThis->_parent->Unlink( addThis );
|
||||
else
|
||||
addThis->_memPool->SetTracked();
|
||||
|
||||
if ( _firstChild ) {
|
||||
TIXMLASSERT( _lastChild );
|
||||
TIXMLASSERT( _firstChild->_prev == 0 );
|
||||
@@ -711,7 +716,9 @@ XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )
|
||||
{
|
||||
if (addThis->_document != _document)
|
||||
return 0;
|
||||
|
||||
TIXMLASSERT( afterThis->_parent == this );
|
||||
|
||||
if ( afterThis->_parent != this ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user