MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / Clear

Method Clear

3rdparty/tinyxml2/tinyxml2.cpp:2224–2255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2222}
2223
2224void XMLDocument::Clear()
2225{
2226 DeleteChildren();
2227 while( _unlinked.Size()) {
2228 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2229 }
2230
2231#ifdef TINYXML2_DEBUG
2232 const bool hadError = Error();
2233#endif
2234 ClearError();
2235
2236 delete [] _charBuffer;
2237 _charBuffer = 0;
2238 _parsingDepth = 0;
2239
2240#if 0
2241 _textPool.Trace( "text" );
2242 _elementPool.Trace( "element" );
2243 _commentPool.Trace( "comment" );
2244 _attributePool.Trace( "attribute" );
2245#endif
2246
2247#ifdef TINYXML2_DEBUG
2248 if ( !hadError ) {
2249 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2250 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2251 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2252 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2253 }
2254#endif
2255}
2256
2257
2258void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

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