MCPcopy Create free account
hub / github.com/adventuregamestudio/ags / Clear

Method Clear

libsrc/tinyxml2/tinyxml2.cpp:2150–2181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2148}
2149
2150void XMLDocument::Clear()
2151{
2152 DeleteChildren();
2153 while( _unlinked.Size()) {
2154 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2155 }
2156
2157#ifdef TINYXML2_DEBUG
2158 const bool hadError = Error();
2159#endif
2160 ClearError();
2161
2162 delete [] _charBuffer;
2163 _charBuffer = 0;
2164 _parsingDepth = 0;
2165
2166#if 0
2167 _textPool.Trace( "text" );
2168 _elementPool.Trace( "element" );
2169 _commentPool.Trace( "comment" );
2170 _attributePool.Trace( "attribute" );
2171#endif
2172
2173#ifdef TINYXML2_DEBUG
2174 if ( !hadError ) {
2175 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2176 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2177 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2178 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2179 }
2180#endif
2181}
2182
2183
2184void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 6

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

Tested by

no test coverage detected