Merge pull request #743 from deduktionstheorem/master

Issue 742: allow intermittent calls of XMLPrinter::ClearBuffer
diff --git a/tinyxml2.h b/tinyxml2.h
index c7d4070..f0f6510 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -2253,10 +2253,10 @@
     	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: