aboutsummaryrefslogtreecommitdiff
path: root/lout/misc.hh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-10 17:56:28 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-10 17:56:28 +0100
commit2b90e4a8893eba68b446383dd652804a74d7d23c (patch)
tree8d379f6ec63e0b9bf15e39c14413f72e0d34fcd1 /lout/misc.hh
parent4f93d036250efbb14e9c87a7866b5e02090b71b4 (diff)
add copy constructor to SimpleVector
Diffstat (limited to 'lout/misc.hh')
-rw-r--r--lout/misc.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/lout/misc.hh b/lout/misc.hh
index f9184bf3..3bbf41dd 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -112,6 +112,13 @@ public:
this->array = NULL;
}
+ inline SimpleVector (const SimpleVector &o) {
+ this->num = o.num;
+ this->numAlloc = o.numAlloc;
+ resize ();
+ memcpy (this->array, o.array, sizeof (T) * num);
+ }
+
inline ~SimpleVector ()
{
if (this->array)