tweak comments. fix copy to self case.

This commit is contained in:
Lee Thomason
2017-06-14 15:14:19 -07:00
parent 1bbc66b193
commit 1346a174ae
2 changed files with 10 additions and 8 deletions

View File

@@ -2052,7 +2052,9 @@ void XMLDocument::Clear()
void XMLDocument::DeepCopy(XMLDocument* target)
{
TIXMLASSERT(target);
TIXMLASSERT(target != this);
if (target == this) {
return; // technically success - a no-op.
}
target->Clear();
for (const XMLNode* node = this->FirstChild(); node; node = node->NextSibling()) {