X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3543c79e6fe198f70130e13c9a2ea68754ba6274..665b537f51f768e19cff57fa9b351a530d6b2015:/src/common/list.cpp diff --git a/src/common/list.cpp b/src/common/list.cpp index 9c5603a0fa..bd111c8ad2 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -// Name: list.cpp +// Name: src/common/list.cpp // Purpose: wxList implementation // Author: Julian Smart // Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added @@ -17,10 +17,6 @@ // headers // ----------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "list.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -594,12 +590,6 @@ void wxObjectListNode::DeleteData() // wxStringList // ---------------------------------------------------------------------------- -static inline wxChar* MYcopystring(const wxString& s) -{ - wxChar* copy = new wxChar[s.length() + 1]; - return wxStrcpy(copy, s.c_str()); -} - static inline wxChar* MYcopystring(const wxChar* s) { wxChar* copy = new wxChar[wxStrlen(s) + 1]; @@ -664,13 +654,19 @@ wxStringList::wxStringList (const wxChar *first, ...) { Add(s); + // icc gives this warning in its own va_arg() macro, argh +#ifdef __INTELC__ + #pragma warning(push) + #pragma warning(disable: 1684) +#endif + s = va_arg(ap, const wxChar *); - // if (s == NULL) -#ifdef __WXMSW__ - if ((int)(long) s == 0) -#else - if ((long) s == 0) + +#ifdef __INTELC__ + #pragma warning(pop) #endif + + if ( !s ) break; } @@ -758,13 +754,12 @@ wxNode *wxStringList::Prepend(const wxChar *s) #else // wxUSE_STL = 1 - #include - WX_DEFINE_LIST(wxObjectList); + #include "wx/listimpl.cpp" + WX_DEFINE_LIST(wxObjectList) // with wxUSE_STL wxStringList contains wxString objects, not pointers -void wxStringListBase::DeleteFunction( const wxString X ) +void wxStringListBase::DeleteFunction( _WX_DELETEFUNCTIONCONST wxString WXUNUSED(X) ) { } #endif // !wxUSE_STL -