X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa61d3525370a9b9fa8c797d9b7f89d96994db5f..0e4124e75398c63ed70d1183b4ab1a3496423a71:/src/mac/carbon/choice.cpp?ds=sidebyside diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index d5575233dc..f2173eb03c 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -14,7 +14,11 @@ #if wxUSE_CHOICE #include "wx/choice.h" -#include "wx/menu.h" + +#ifndef WX_PRECOMP + #include "wx/menu.h" +#endif + #include "wx/mac/uma.h" extern MenuHandle NewUniqueMenu() ; @@ -213,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 ) ; }