Add clear() function alias

This commit is contained in:
baldurk
2016-10-12 16:50:26 +02:00
parent 7cf7fc0c34
commit f6c3c46050
+1
View File
@@ -136,6 +136,7 @@ struct array
// provide some of the familiar stl interface
size_t size() const { return (size_t)count; }
void clear() { Delete(); }
bool empty() const { return count == 0; }
T *begin() { return elems ? elems : end(); }
T *end() { return elems ? elems + count : NULL; }