git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66652
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// items access (range checking is done in debug version)
// get item at position uiIndex
// items access (range checking is done in debug version)
// get item at position uiIndex
- wxString& Item(size_t nIndex) const
+ wxString& Item(size_t nIndex)
{
wxASSERT_MSG( nIndex < m_nCount,
wxT("wxArrayString: index out of bounds") );
return m_pItems[nIndex];
}
{
wxASSERT_MSG( nIndex < m_nCount,
wxT("wxArrayString: index out of bounds") );
return m_pItems[nIndex];
}
+ const wxString& Item(size_t nIndex) const { return const_cast<wxArrayString*>(this)->Item(nIndex); }
- wxString& operator[](size_t nIndex) const { return Item(nIndex); }
+ wxString& operator[](size_t nIndex) { return Item(nIndex); }
+ const wxString& operator[](size_t nIndex) const { return Item(nIndex); }
{
wxASSERT_MSG( !IsEmpty(),
wxT("wxArrayString: index out of bounds") );
return Item(GetCount() - 1);
}
{
wxASSERT_MSG( !IsEmpty(),
wxT("wxArrayString: index out of bounds") );
return Item(GetCount() - 1);
}
+ const wxString& Last() const { return const_cast<wxArrayString*>(this)->Last(); }