X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f32f5856595dcf584e7a4f2c6617268eabc7520..3786c8b587f82e406ba9656847b5bff4ed9209c2:/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);\ }\