summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bus/Ivy/DataTypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bus/Ivy/DataTypes.h b/Bus/Ivy/DataTypes.h
index 99b6e05..acc4aa0 100644
--- a/Bus/Ivy/DataTypes.h
+++ b/Bus/Ivy/DataTypes.h
@@ -260,6 +260,9 @@ public:
void reserve( size_t index )
{
if ( index >= len )
+ resize( index );
+ }
+ void resize( size_t index )
{
size_t i;
T* newdata = new T[index];
@@ -271,7 +274,6 @@ public:
data = newdata;
len = index;
}
- }
// Accesses indexed component of vector
T & operator [](size_t index )
{