]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix STL compilation (note: this is not the correct fix, but since
authorMattia Barbon <mbarbon@cpan.org>
Sat, 23 Apr 2005 22:02:07 +0000 (22:02 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 23 Apr 2005 22:02:07 +0000 (22:02 +0000)
wxCB_SORT is already ignored for wxUSE_STL == 1 on Mac, let's take
the easy/certainly binary compatible path).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/choice.cpp

index 5ed7a98e2b91bc7eaa590fee038181d74900b42b..b173ac7d558ccae6ce267bef6cd66c5e457b0ddb 100644 (file)
@@ -101,7 +101,13 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
 // ----------------------------------------------------------------------------
 int wxChoice::DoAppend(const wxString& item)
 {
+    // FIXME: STL version of wxArrayString doesn't have the same args
+#if wxUSE_STL
+    size_t index = m_strings.size();
+    m_strings.Add( item );
+#else
     size_t index = m_strings.Add( item ) ;
+#endif
     m_datas.Insert( NULL , index ) ;
     UMAInsertMenuItem(MAC_WXHMENU( m_macPopUpMenuHandle ) , item, m_font.GetEncoding() , index );
     DoSetItemClientData( index , NULL ) ;