diff options
Diffstat (limited to 'src/core/smallvec_type.hpp')
-rw-r--r-- | src/core/smallvec_type.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 4c6c8bf04..d64f4a744 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -13,6 +13,7 @@ #define SMALLVEC_TYPE_HPP #include "alloc_func.hpp" +#include "mem_func.hpp" #include "math_func.hpp" /** @@ -35,6 +36,12 @@ protected: public: SmallVector() : data(NULL), items(0), capacity(0) { } + template<uint X> + SmallVector(const SmallVector<T, X> &other) : data(NULL), items(0), capacity(0) + { + MemCpyT<T>(this->Append(other.Length()), other.Begin(), other.Length()); + } + ~SmallVector() { free(this->data); |