@@ -36,36 +36,66 @@ public:
SmallVector() : data(NULL), items(0), capacity(0) { }
/**
* Copy constructor.
* @param other The other vector to copy.
*/
SmallVector(const SmallVector &other) : data(NULL), items(0), capacity(0)
{
this->Assign(other);
}
* Generic copy constructor.
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());
* Assignment.
* @param other The new vector that.
* @param other The other vector to assign.
SmallVector &operator=(const SmallVector &other)
return *this;
* Generic assignment.
SmallVector &operator=(const SmallVector<T, X> &other)
this->Reset();
~SmallVector()
free(this->data);
* Assign items from other vector.
inline void Assign(const SmallVector<T, X> &other)
if ((const void *)&other == (void *)this) return;
this->Clear();
if (other.Length() > 0) MemCpyT<T>(this->Append(other.Length()), other.Begin(), other.Length());
* Remove all items from the list.
inline void Clear()
/* In fact we just reset the item counter avoiding the need to
* probably reallocate the same amount of memory the list was
Status change: