From: Julian Smart Date: Tue, 6 Jun 2006 11:03:31 +0000 (+0000) Subject: Suppress assertion when the array is sorted X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dd61c39df27bfb6eff6864854a9819fc5a0cc2b4 Suppress assertion when the array is sorted git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index d4268c6e97..f2173eb03c 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -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 ) ; }