From 3cebdc4fac1dd762f2304cbb3db7d3bbb3e93622 Mon Sep 17 00:00:00 2001 From: Lee Thomason Date: Mon, 5 Jan 2015 17:16:28 -0800 Subject: [PATCH] clean up function names. clean up pointer --- tinyxml2.cpp | 14 +++++++------- tinyxml2.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 5633397..14cc91a 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -675,7 +675,7 @@ XMLNode* XMLNode::InsertEndChild( XMLNode* addThis ) TIXMLASSERT( false ); return 0; } - BeforeInsertChild( addThis ); + InsertChildPreamble( addThis ); if ( _lastChild ) { TIXMLASSERT( _firstChild ); @@ -705,7 +705,7 @@ XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis ) TIXMLASSERT( false ); return 0; } - BeforeInsertChild( addThis ); + InsertChildPreamble( addThis ); if ( _firstChild ) { TIXMLASSERT( _lastChild ); @@ -748,7 +748,7 @@ XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ) // The last node or the only node. return InsertEndChild( addThis ); } - BeforeInsertChild( addThis ); + InsertChildPreamble( addThis ); addThis->_prev = afterThis; addThis->_next = afterThis->_next; afterThis->_next->_prev = addThis; @@ -898,7 +898,7 @@ void XMLNode::DeleteNode( XMLNode* node ) pool->Free( node ); } -void XMLNode::BeforeInsertChild( XMLNode* insertThis ) const +void XMLNode::InsertChildPreamble( XMLNode* insertThis ) const { TIXMLASSERT( insertThis ); TIXMLASSERT( insertThis->_document == _document ); @@ -1925,14 +1925,14 @@ void XMLDocument::Parse() { TIXMLASSERT( NoChildren() ); // Clear() must have been called previously TIXMLASSERT( _charBuffer ); - const char* p = _charBuffer; + char* p = _charBuffer; p = XMLUtil::SkipWhiteSpace( p ); - p = XMLUtil::ReadBOM( p, &_writeBOM ); + p = (char*) XMLUtil::ReadBOM( p, &_writeBOM ); if ( !*p ) { SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 ); return; } - ParseDeep( _charBuffer + (p-_charBuffer), 0 ); + ParseDeep(p, 0 ); } XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) : diff --git a/tinyxml2.h b/tinyxml2.h index 9f130fb..b18caf1 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -899,7 +899,7 @@ private: MemPool* _memPool; void Unlink( XMLNode* child ); static void DeleteNode( XMLNode* node ); - void BeforeInsertChild( XMLNode* insertThis ) const; + void InsertChildPreamble( XMLNode* insertThis ) const; };