diff options
Diffstat (limited to 'src/core/smallvec_type.hpp')
-rw-r--r-- | src/core/smallvec_type.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index d64f4a744..89b12d5f5 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -36,12 +36,20 @@ protected: public: SmallVector() : data(NULL), items(0), capacity(0) { } - template<uint X> + 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()); } + template <uint X> + SmallVector &operator=(const SmallVector<T, X> &other) + { + this->Reset(); + MemCpyT<T>(this->Append(other.Length()), other.Begin(), other.Length()); + return *this; + } + ~SmallVector() { free(this->data); |