MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / Clear

Method Clear

native/thirdpart/tinyxml2/tinyxml2.cpp:2192–2223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

createFromXmlMethod · 0.45
DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 5

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

Tested by

no test coverage detected