Suppress assertion when the array is sorted

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-06-06 11:03:31 +00:00
parent 62ad77afbd
commit dd61c39df2

View File

@@ -217,6 +217,12 @@ unsigned int wxChoice::GetCount() const
int wxChoice::FindString( const wxString& s, bool bCase ) const
{
#if !wxUSE_STL
// Avoid assert for non-default args passed to sorted array Index
if ( HasFlag(wxCB_SORT) )
bCase = true;
#endif
return m_strings.Index( s , bCase ) ;
}