X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a236aa2058ccf3d36e9cafc20fa7375080c4be50..f51723055aa4334a355a19e87bb2b478b4204d15:/src/msw/wince/checklst.cpp diff --git a/src/msw/wince/checklst.cpp b/src/msw/wince/checklst.cpp index d5f5274921..334f86fd51 100644 --- a/src/msw/wince/checklst.cpp +++ b/src/msw/wince/checklst.cpp @@ -185,20 +185,17 @@ void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck) // interface derived from wxListBox and lower classes // -------------------------------------------------- -void wxCheckListBox::Clear() +void wxCheckListBox::DoClear() { unsigned int n = GetCount(); while ( n > 0 ) { n--; - Delete(n); + DoDeleteOneItem(n); } - m_itemsClientData.Clear(); - - wxCHECK_RET( n == GetCount(), - _T("broken wxCheckListBox::Clear()") ); + wxASSERT_MSG( IsEmpty(), _T("logic error in DoClear()") ); } unsigned int wxCheckListBox::GetCount() const @@ -267,10 +264,10 @@ int wxCheckListBox::DoInsertItems(const wxArrayStringsAdapter & items, unsigned int pos, void **clientData, wxClientDataType type) { - ListView_SetItemCount( GetHwnd(), GetCount() + count ); - const unsigned int count = items.GetCount(); + ListView_SetItemCount( GetHwnd(), GetCount() + count ); + int n = wxNOT_FOUND; for( unsigned int i = 0; i < count; i++ )