X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f32f5856595dcf584e7a4f2c6617268eabc7520..4523ebb3f1c3576d687112d3a65141f7297ea02b:/include/wx/vector.h diff --git a/include/wx/vector.h b/include/wx/vector.h index 38a8f90630..8ffc4a74f1 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -48,7 +48,7 @@ protected: const void *GetItem(size_type idx) const { - wxASSERT(idx >= 0 && idx < m_size); + wxASSERT(idx < m_size); return m_objects[idx]; } @@ -61,7 +61,7 @@ protected: 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( @@ -132,7 +132,7 @@ public: }; #define WX_DECLARE_VECTORBASE(obj, cls)\ -private:\ +protected:\ virtual void Free(void *o)\ {\ delete (obj *) o;\ @@ -143,7 +143,7 @@ private:\ }\ public:\ cls() {}\ - cls(const cls& c)\ + cls(const cls& c) : wxVectorBase()\ {\ wxCHECK2(copy(c), return);\ }\