mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-28 22:52:59 +04:00
tweak comments. fix copy to self case.
This commit is contained in:
+3
-1
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user