MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / DeepCopy

Method DeepCopy

externals/tinyxml2/tinyxml2.cpp:2258–2269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2256
2257
2258void XMLDocument::DeepCopy(XMLDocument* target) const
2259{
2260 TIXMLASSERT(target);
2261 if (target == this) {
2262 return; // technically success - a no-op.
2263 }
2264
2265 target->Clear();
2266 for (const XMLNode* node = this->FirstChild(); node; node = node->NextSibling()) {
2267 target->InsertEndChild(node->DeepClone(target));
2268 }
2269}
2270
2271XMLElement* XMLDocument::NewElement( const char* name )
2272{

Callers

nothing calls this directly

Calls 3

InsertEndChildMethod · 0.80
DeepCloneMethod · 0.80
ClearMethod · 0.45

Tested by

no test coverage detected