X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..2f36b4d22beeb7f4f0cedf922c0c26d037f54477:/src/common/list.cpp diff --git a/src/common/list.cpp b/src/common/list.cpp index dcfb1b3358..6eadb1533a 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence //////////////////////////////////////////////////////////////////////////////// @@ -33,7 +32,7 @@ #include "wx/crt.h" #endif -#if !wxUSE_STL +#if !wxUSE_STD_CONTAINERS // ============================================================================= // implementation @@ -171,22 +170,18 @@ void wxListBase::DoCopy(const wxListBase& list) { case wxKEY_INTEGER: { - long key; for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) { - key = node->GetKeyInteger(); - Append(key, node->GetData()); + Append(node->GetKeyInteger(), node->GetData()); } break; } case wxKEY_STRING: { - const wxChar *key; for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) { - key = node->GetKeyString(); - Append(key, node->GetData()); + Append(node->GetKeyString(), node->GetData()); } break; } @@ -201,7 +196,7 @@ void wxListBase::DoCopy(const wxListBase& list) } } - wxASSERT_MSG( m_count == list.m_count, _T("logic error in wxList::DoCopy") ); + wxASSERT_MSG( m_count == list.m_count, wxT("logic error in wxList::DoCopy") ); } wxListBase::~wxListBase() @@ -701,9 +696,13 @@ bool wxStringList::Member(const wxChar *s) const } #ifdef __WXWINCE__ -extern "C" int __cdecl +extern "C" +{ +static int __cdecl #else -extern "C" int LINKAGEMODE +extern "C" +{ +static int LINKAGEMODE #endif wx_comparestrings(const void *arg1, const void *arg2) @@ -714,6 +713,8 @@ wx_comparestrings(const void *arg1, const void *arg2) return wxStrcmp (*s1, *s2); } +} // end of extern "C" (required because of GCC Bug c++/33078 + // Sort a list of strings - deallocates old nodes, allocates new void wxStringList::Sort() { @@ -750,16 +751,16 @@ wxNode *wxStringList::Prepend(const wxChar *s) #endif // wxLIST_COMPATIBILITY -#else // wxUSE_STL = 1 +#else // wxUSE_STD_CONTAINERS = 1 #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxObjectList) -// with wxUSE_STL wxStringList contains wxString objects, not pointers +// with wxUSE_STD_CONTAINERS wxStringList contains wxString objects, not pointers void _WX_LIST_HELPER_wxStringListBase::DeleteFunction( wxString WXUNUSED(X) ) { } -wxStringListBase::BaseListType wxStringListBase::EmptyList; +_WX_LIST_HELPER_wxStringListBase::BaseListType _WX_LIST_HELPER_wxStringListBase::EmptyList; -#endif // !wxUSE_STL +#endif // !wxUSE_STD_CONTAINERS