const void *GetItem(size_type idx) const
{
- wxASSERT(idx >= 0 && idx < m_size);
+ wxASSERT(idx < m_size);
return m_objects[idx];
}
void RemoveAt(size_type idx)
{
- wxASSERT(idx >= 0 && idx < m_size);
+ wxASSERT(idx < m_size);
Free(m_objects[idx]);
if (idx < m_size - 1)
memcpy(
};
#define WX_DECLARE_VECTORBASE(obj, cls)\
-private:\
+protected:\
virtual void Free(void *o)\
{\
delete (obj *) o;\
}\
public:\
cls() {}\
- cls(const cls& c)\
+ cls(const cls& c) : wxVectorBase()\
{\
wxCHECK2(copy(c), return);\
}\
#define _WX_DECLARE_VECTOR(obj, cls, exp)\
class exp cls : public wxVectorBase\
{\
- WX_DECLARE_VECTORBASE(obj, cls);\
+ WX_DECLARE_VECTORBASE(obj, cls)\
public:\
void push_back(const obj& o)\
{\