Added resize function wrapper to Array. Changed redundant else if to else in Array reset

This commit is contained in:
Jordan Cristiano 2015-07-13 23:21:06 -04:00
parent d3b8873481
commit 6be95005c5
1 changed files with 6 additions and 1 deletions

View File

@ -46,7 +46,7 @@ public:
m_array = new T[length]; m_array = new T[length];
m_length = length; m_length = length;
} }
else if (length <= 0) else // if (length <= 0)
{ {
m_array = nullptr; m_array = nullptr;
m_length = 0; m_length = 0;
@ -54,6 +54,11 @@ public:
return (length >= 0); return (length >= 0);
} }
bool resize(SizeType length)
{
return reset(length);
}
T* begin() const T* begin() const
{ {
return m_array; return m_array;