Add wxUSE_STD_CONTAINERS and turn it on by default.
Previously, wxUSE_STL enabled both implicit conversion of wxString to std::[w]string and use of standard containers for the implementation of their wx equivalents. Split up the two roles now by allowing to enable the use of the standard containers independently of (backwards incompatible) implicit conversion in wxString and actually enable wxUSE_STD_CONTAINERS by default. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,7 +78,7 @@ bool wxChoice::Create(wxWindow *parent,
|
||||
|
||||
MacPostControlCreate( pos, size );
|
||||
|
||||
#if !wxUSE_STL
|
||||
#if !wxUSE_STD_CONTAINERS
|
||||
if ( style & wxCB_SORT )
|
||||
// autosort
|
||||
m_strings = wxArrayString( 1 );
|
||||
@@ -109,7 +109,7 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items,
|
||||
{
|
||||
unsigned int idx;
|
||||
|
||||
#if wxUSE_STL
|
||||
#if wxUSE_STD_CONTAINERS
|
||||
if ( IsSorted() )
|
||||
{
|
||||
wxArrayString::iterator
|
||||
@@ -118,7 +118,7 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items,
|
||||
m_strings.insert( insertPoint, items[i] );
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_STL
|
||||
#endif // wxUSE_STD_CONTAINERS
|
||||
{
|
||||
idx = pos;
|
||||
m_strings.Insert( items[i], idx );
|
||||
@@ -189,7 +189,7 @@ unsigned int wxChoice::GetCount() const
|
||||
|
||||
int wxChoice::FindString( const wxString& s, bool bCase ) const
|
||||
{
|
||||
#if !wxUSE_STL
|
||||
#if !wxUSE_STD_CONTAINERS
|
||||
// Avoid assert for non-default args passed to sorted array Index
|
||||
if ( IsSorted() )
|
||||
bCase = true;
|
||||
|
||||
Reference in New Issue
Block a user