瀏覽代碼

Add 'const' on XMLDocument::DeepCopy. This make us copy const
XMLDocument being copied to another document.

Shuichiro Suzuki 8 年之前
父節點
當前提交
87cd4e0582
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      tinyxml2.cpp
  2. 1 1
      tinyxml2.h

+ 1 - 1
tinyxml2.cpp

@@ -2054,7 +2054,7 @@ void XMLDocument::Clear()
 }
 
 
-void XMLDocument::DeepCopy(XMLDocument* target)
+void XMLDocument::DeepCopy(XMLDocument* target) const
 {
 	TIXMLASSERT(target);
     if (target == this) {

+ 1 - 1
tinyxml2.h

@@ -1826,7 +1826,7 @@ public:
 
 		NOTE: that the 'target' must be non-null.
 	*/
-	void DeepCopy(XMLDocument* target);
+	void DeepCopy(XMLDocument* target) const;
 
 	// internal
     char* Identify( char* p, XMLNode** node );