1.1 --- a/sourcehook/sh_stack.h Fri Oct 14 04:25:28 2005 +0000
1.2 +++ b/sourcehook/sh_stack.h Fri Oct 14 17:45:36 2005 +0000
1.3 @@ -13,8 +13,6 @@
1.4
1.5 #define SH_STACK_DEFAULT_SIZE 4
1.6
1.7 -#include <assert.h>
1.8 -
1.9 namespace SourceHook
1.10 {
1.11 // Vector
1.12 @@ -101,20 +99,18 @@
1.13 m_AllocatedSize(SH_STACK_DEFAULT_SIZE),
1.14 m_UsedSize(0)
1.15 {
1.16 - assert(m_Elements);
1.17 }
1.18 CStack(size_t size) : m_Elements(new T[size]),
1.19 m_AllocatedSize(size),
1.20 m_UsedSize(0)
1.21 {
1.22 - assert(m_Elements);
1.23 }
1.24
1.25 CStack(const CStack &other) : m_Elements(NULL),
1.26 m_AllocatedSize(0),
1.27 m_UsedSize(0)
1.28 {
1.29 - assert(reserve(other.m_AllocatedSize) && m_Elements);
1.30 + reserve(other.m_AllocatedSize);
1.31 m_UsedSize = other.m_UsedSize;
1.32 for (size_t i = 0; i < m_UsedSize; ++i)
1.33 m_Elements[i] = other.m_Elements[i];
1.34 @@ -133,7 +129,6 @@
1.35 if (m_Elements)
1.36 delete [] m_Elements;
1.37 m_Elements = new T[other.m_AllocatedSize];
1.38 - assert(m_Elements);
1.39 m_AllocatedSize = other.m_AllocatedSize;
1.40 }
1.41 m_UsedSize = other.m_UsedSize;