mirror of
https://github.com/AxioDL/tinyxml2.git
synced 2025-06-05 14:13:43 +00:00
clean up function names. clean up pointer
This commit is contained in:
parent
75b4e23957
commit
3cebdc4fac
14
tinyxml2.cpp
14
tinyxml2.cpp
@ -675,7 +675,7 @@ XMLNode* XMLNode::InsertEndChild( XMLNode* addThis )
|
|||||||
TIXMLASSERT( false );
|
TIXMLASSERT( false );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
BeforeInsertChild( addThis );
|
InsertChildPreamble( addThis );
|
||||||
|
|
||||||
if ( _lastChild ) {
|
if ( _lastChild ) {
|
||||||
TIXMLASSERT( _firstChild );
|
TIXMLASSERT( _firstChild );
|
||||||
@ -705,7 +705,7 @@ XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
|
|||||||
TIXMLASSERT( false );
|
TIXMLASSERT( false );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
BeforeInsertChild( addThis );
|
InsertChildPreamble( addThis );
|
||||||
|
|
||||||
if ( _firstChild ) {
|
if ( _firstChild ) {
|
||||||
TIXMLASSERT( _lastChild );
|
TIXMLASSERT( _lastChild );
|
||||||
@ -748,7 +748,7 @@ XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )
|
|||||||
// The last node or the only node.
|
// The last node or the only node.
|
||||||
return InsertEndChild( addThis );
|
return InsertEndChild( addThis );
|
||||||
}
|
}
|
||||||
BeforeInsertChild( addThis );
|
InsertChildPreamble( addThis );
|
||||||
addThis->_prev = afterThis;
|
addThis->_prev = afterThis;
|
||||||
addThis->_next = afterThis->_next;
|
addThis->_next = afterThis->_next;
|
||||||
afterThis->_next->_prev = addThis;
|
afterThis->_next->_prev = addThis;
|
||||||
@ -898,7 +898,7 @@ void XMLNode::DeleteNode( XMLNode* node )
|
|||||||
pool->Free( node );
|
pool->Free( node );
|
||||||
}
|
}
|
||||||
|
|
||||||
void XMLNode::BeforeInsertChild( XMLNode* insertThis ) const
|
void XMLNode::InsertChildPreamble( XMLNode* insertThis ) const
|
||||||
{
|
{
|
||||||
TIXMLASSERT( insertThis );
|
TIXMLASSERT( insertThis );
|
||||||
TIXMLASSERT( insertThis->_document == _document );
|
TIXMLASSERT( insertThis->_document == _document );
|
||||||
@ -1925,14 +1925,14 @@ void XMLDocument::Parse()
|
|||||||
{
|
{
|
||||||
TIXMLASSERT( NoChildren() ); // Clear() must have been called previously
|
TIXMLASSERT( NoChildren() ); // Clear() must have been called previously
|
||||||
TIXMLASSERT( _charBuffer );
|
TIXMLASSERT( _charBuffer );
|
||||||
const char* p = _charBuffer;
|
char* p = _charBuffer;
|
||||||
p = XMLUtil::SkipWhiteSpace( p );
|
p = XMLUtil::SkipWhiteSpace( p );
|
||||||
p = XMLUtil::ReadBOM( p, &_writeBOM );
|
p = (char*) XMLUtil::ReadBOM( p, &_writeBOM );
|
||||||
if ( !*p ) {
|
if ( !*p ) {
|
||||||
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
|
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ParseDeep( _charBuffer + (p-_charBuffer), 0 );
|
ParseDeep(p, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
|
XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
|
||||||
|
@ -899,7 +899,7 @@ private:
|
|||||||
MemPool* _memPool;
|
MemPool* _memPool;
|
||||||
void Unlink( XMLNode* child );
|
void Unlink( XMLNode* child );
|
||||||
static void DeleteNode( XMLNode* node );
|
static void DeleteNode( XMLNode* node );
|
||||||
void BeforeInsertChild( XMLNode* insertThis ) const;
|
void InsertChildPreamble( XMLNode* insertThis ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user