MCPcopy Create free account
hub / github.com/cemu-project/Cemu / Clear

Method Clear

src/util/tinyxml2/tinyxml2.cpp:2040–2070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2038 }
2039
2040 void XMLDocument::Clear()
2041 {
2042 DeleteChildren();
2043 while (_unlinked.Size()) {
2044 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2045 }
2046
2047#ifdef DEBUG
2048 const bool hadError = Error();
2049#endif
2050 ClearError();
2051
2052 delete[] _charBuffer;
2053 _charBuffer = 0;
2054
2055#if 0
2056 _textPool.Trace("text");
2057 _elementPool.Trace("element");
2058 _commentPool.Trace("comment");
2059 _attributePool.Trace("attribute");
2060#endif
2061
2062#ifdef DEBUG
2063 if (!hadError) {
2064 TIXMLASSERT(_elementPool.CurrentAllocs() == _elementPool.Untracked());
2065 TIXMLASSERT(_attributePool.CurrentAllocs() == _attributePool.Untracked());
2066 TIXMLASSERT(_textPool.CurrentAllocs() == _textPool.Untracked());
2067 TIXMLASSERT(_commentPool.CurrentAllocs() == _commentPool.Untracked());
2068 }
2069#endif
2070 }
2071
2072
2073 void 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