MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / Clear

Method Clear

Dependencies/tinyxml2/src/tinyxml2.cpp:2044–2075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2042}
2043
2044void XMLDocument::Clear()
2045{
2046 DeleteChildren();
2047 while( _unlinked.Size()) {
2048 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2049 }
2050
2051#ifdef TINYXML2_DEBUG
2052 const bool hadError = Error();
2053#endif
2054 ClearError();
2055
2056 delete [] _charBuffer;
2057 _charBuffer = 0;
2058 _parsingDepth = 0;
2059
2060#if 0
2061 _textPool.Trace( "text" );
2062 _elementPool.Trace( "element" );
2063 _commentPool.Trace( "comment" );
2064 _attributePool.Trace( "attribute" );
2065#endif
2066
2067#ifdef TINYXML2_DEBUG
2068 if ( !hadError ) {
2069 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2070 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2071 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2072 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2073 }
2074#endif
2075}
2076
2077
2078void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 6

ErrorFunction · 0.85
ClearErrorFunction · 0.85
SizeMethod · 0.80
TraceMethod · 0.80
CurrentAllocsMethod · 0.80
UntrackedMethod · 0.80

Tested by

no test coverage detected