Add tuner components
[satune.git] / src / Collections / cppvector.h
index b8497d90857af941c12b24a74126a80714c99998..1c446068d1945637a1f3ec4bd62d3ea6310c9234 100644 (file)
@@ -20,6 +20,12 @@ public:
                memcpy(array, _array, capacity * sizeof(type));
        }
 
+       Vector(Vector<type> *v) :
+               size(v->size),
+               capacity(v->capacity),
+               array((type *) ourmalloc(sizeof(type) * v->capacity)) {
+               memcpy(array, v->array, capacity * sizeof(type));
+       }
        void pop() {
                size--;
        }