瀏覽代碼

Merge pull request #743 from deduktionstheorem/master

Issue 742: allow intermittent calls of XMLPrinter::ClearBuffer
Lee Thomason 6 年之前
父節點
當前提交
1675bec2f2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tinyxml2.h

+ 2 - 2
tinyxml2.h

@@ -2253,10 +2253,10 @@ public:
     	If in print to memory mode, reset the buffer to the
     	beginning.
     */
-    void ClearBuffer() {
+    void ClearBuffer( bool resetToFirstElement = true ) {
         _buffer.Clear();
         _buffer.Push(0);
-		_firstElement = true;
+		_firstElement = resetToFirstElement;
     }
 
 protected: