Make assert in wxMSW wxListCtrl::InsertItem() more informative.

Assert if inserting an item failed (this is really unexpected and must be a
programmer error) instead of asserting about items number mismatch -- which
might be true but only indirectly helpful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-10-16 14:35:21 +00:00
parent 23d74d894d
commit 2d5e5799a9

View File

@ -1753,7 +1753,10 @@ long wxListCtrl::InsertItem(const wxListItem& info)
}
}
long rv = ListView_InsertItem(GetHwnd(), & item);
const long rv = ListView_InsertItem(GetHwnd(), & item);
// failing to insert the item is really unexpected
wxCHECK_MSG( rv != -1, rv, "failed to insert an item in wxListCtrl" );
m_count++;
wxASSERT_MSG( m_count == ListView_GetItemCount(GetHwnd()),