commit | 4e74b13e7a8f75be30e1fde54f041b5cd7640aab | [log] [tgz] |
---|---|---|
author | Reinhard Klambauer <reinhard.klambauer@tugraz.at> | Fri Nov 22 14:01:58 2013 +0100 |
committer | Reinhard Klambauer <reinhard.klambauer@tugraz.at> | Fri Nov 22 14:01:58 2013 +0100 |
tree | 8c4662792a5e8359c4234ad2bca809107731d7e4 | |
parent | 370761b1797effdde72d4d442aacfabc364d14f1 [diff] [blame] |
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.
diff --git a/tinyxml2.h b/tinyxml2.h index ca3d90e..26179f9 100755 --- a/tinyxml2.h +++ b/tinyxml2.h
@@ -216,6 +216,10 @@ } } + void Reset() { + _size = 0; + } + void Push( T t ) { EnsureCapacity( _size+1 ); _mem[_size++] = t;