diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-10 17:56:28 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-10 17:56:28 +0100 |
commit | 2b90e4a8893eba68b446383dd652804a74d7d23c (patch) | |
tree | 8d379f6ec63e0b9bf15e39c14413f72e0d34fcd1 | |
parent | 4f93d036250efbb14e9c87a7866b5e02090b71b4 (diff) |
add copy constructor to SimpleVector
-rw-r--r-- | lout/misc.hh | 7 |
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) |