This commit is contained in:
Irlan
2017-11-25 14:48:32 -02:00
parent cd32a1c515
commit dc73b414b3
2 changed files with 12 additions and 4 deletions

View File

@ -197,6 +197,11 @@ protected:
b3Array(const b3Array<T>& other)
{
m_localElements = nullptr;
m_capacity = 0;
m_elements = nullptr;
m_count = 0;
Swap(other);
}

View File

@ -221,6 +221,11 @@ protected:
b3ObjectArray(const b3ObjectArray<T>& other)
{
m_localElements = nullptr;
m_capacity = 0;
m_elements = nullptr;
m_count = 0;
Swap(other);
}
@ -252,7 +257,7 @@ template <typename T, u32 N>
class b3StackObjectArray : public b3ObjectArray<T>
{
public:
b3StackObjectArray<T, N>() : b3ObjectArray<T>(m_stackElements, N)
b3StackObjectArray<T, N>() : b3ObjectArray<T>((T*)m_stackElements, N)
{
}
@ -275,9 +280,7 @@ public:
}
protected:
//@todo
// u8 m_bytes[N * sizeof(T)];
T m_stackElements[N];
u8 m_stackElements[N * sizeof(T)];
};
#endif