summaryrefslogtreecommitdiffstats
path: root/raul/Array.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-01 19:52:36 +0000
committerDavid Robillard <d@drobilla.net>2008-01-01 19:52:36 +0000
commitcb21a7b08354134307637eb822a3c1ad9cb7ed23 (patch)
treefed8b9484141e723317a00886b0bd8bc841c9397 /raul/Array.hpp
parent143d9b1599a82a35165fd8e17f249998f95f15d0 (diff)
downloadraul-cb21a7b08354134307637eb822a3c1ad9cb7ed23.tar.gz
raul-cb21a7b08354134307637eb822a3c1ad9cb7ed23.tar.bz2
raul-cb21a7b08354134307637eb822a3c1ad9cb7ed23.zip
RAUL code cleanup.
git-svn-id: http://svn.drobilla.net/lad/raul@999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/Array.hpp')
-rw-r--r--raul/Array.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/raul/Array.hpp b/raul/Array.hpp
index db0c182..0dfa75f 100644
--- a/raul/Array.hpp
+++ b/raul/Array.hpp
@@ -28,7 +28,9 @@ namespace Raul {
/** An array.
*
- * Has a stack-like push_back() too, for find_process_order...
+ * Has a stack-like push_back(), but is NOT a resizeable array (the size given
+ * to the constructor or alloc method is the maximum number of elements which
+ * can be pushed).
*/
template <class T>
class Array : public Deletable
@@ -56,7 +58,7 @@ public:
}
~Array() {
- free();
+ delete[] _elems;
}
void alloc(size_t num_elems) {
@@ -81,10 +83,6 @@ public:
_elems[i] = initial_value;
}
- void free() {
- delete[] _elems;
- }
-
void push_back(T n) {
assert(_top < _size);
_elems[_top++] = n;