MCPcopy Create free account
hub / github.com/avast/retdec / Clear

Method Clear

deps/tinyxml2/tinyxml2.cpp:2117–2148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2115}
2116
2117void XMLDocument::Clear()
2118{
2119 DeleteChildren();
2120 while( _unlinked.Size()) {
2121 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2122 }
2123
2124#ifdef TINYXML2_DEBUG
2125 const bool hadError = Error();
2126#endif
2127 ClearError();
2128
2129 delete [] _charBuffer;
2130 _charBuffer = 0;
2131 _parsingDepth = 0;
2132
2133#if 0
2134 _textPool.Trace( "text" );
2135 _elementPool.Trace( "element" );
2136 _commentPool.Trace( "comment" );
2137 _attributePool.Trace( "attribute" );
2138#endif
2139
2140#ifdef TINYXML2_DEBUG
2141 if ( !hadError ) {
2142 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2143 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2144 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2145 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2146 }
2147#endif
2148}
2149
2150
2151void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 6

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

Tested by

no test coverage detected