1
0
Эх сурвалжийг харах

Added a method to reset the memory buffer of the DynArray class.

The the allocated memory will not be touched so the capacity keeps its current level.
Reinhard Klambauer 12 жил өмнө
parent
commit
4e74b13e7a
1 өөрчлөгдсөн 4 нэмэгдсэн , 0 устгасан
  1. 4 0
      tinyxml2.h

+ 4 - 0
tinyxml2.h

@@ -216,6 +216,10 @@ public:
         }
     }
 
+    void Reset() {
+        _size = 0;
+    }
+
     void Push( T t ) {
         EnsureCapacity( _size+1 );
         _mem[_size++] = t;