// assignment operator
wxBaseArray& wxBaseArray::operator=(const wxBaseArray& src)
{
- DELETEA(m_pItems);
+ wxDELETEA(m_pItems);
m_uiSize = // not src.m_uiSize to save memory
m_uiCount = src.m_uiCount;
// dtor
wxBaseArray::~wxBaseArray()
{
- DELETEA(m_pItems);
+ wxDELETEA(m_pItems);
}
// clears the list
m_uiSize =
m_uiCount = 0;
- DELETEA(m_pItems);
- m_pItems = NULL;
+ wxDELETEA(m_pItems);
}
// pre-allocates memory (frees the previous data!)
// only if old buffer was not big enough
if ( uiSize > m_uiSize ) {
- DELETEA(m_pItems);
+ wxDELETEA(m_pItems);
m_pItems = new long[uiSize];
m_uiSize = uiSize;
}
}
// search for an item in a sorted array (binary search)
-int wxBaseArray::Index(long lItem, CMPFUNC fnCompare)
+int wxBaseArray::Index(long lItem, CMPFUNC fnCompare) const
{
uint i,
lo = 0,