MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / Clear

Method Clear

libs/IO/TinyXML2.cpp:2193–2224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2191}
2192
2193void XMLDocument::Clear()
2194{
2195 DeleteChildren();
2196 while( _unlinked.Size()) {
2197 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2198 }
2199
2200#ifdef TINYXML2_DEBUG
2201 const bool hadError = Error();
2202#endif
2203 ClearError();
2204
2205 delete [] _charBuffer;
2206 _charBuffer = 0;
2207 _parsingDepth = 0;
2208
2209#if 0
2210 _textPool.Trace( "text" );
2211 _elementPool.Trace( "element" );
2212 _commentPool.Trace( "comment" );
2213 _attributePool.Trace( "attribute" );
2214#endif
2215
2216#ifdef TINYXML2_DEBUG
2217 if ( !hadError ) {
2218 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2219 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2220 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2221 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2222 }
2223#endif
2224}
2225
2226
2227void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 5

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

Tested by

no test coverage detected