]> git.saurik.com Git - wxWidgets.git/commitdiff
DeleteFunction argument should be non-const since it
authorMattia Barbon <mbarbon@cpan.org>
Fri, 3 Feb 2006 18:26:55 +0000 (18:26 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Fri, 3 Feb 2006 18:26:55 +0000 (18:26 +0000)
is deleted inside the function.

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

include/wx/list.h
include/wx/listimpl.cpp
src/common/list.cpp

index a83cff416650e4c95b7b71930516dd9b6690a8a0..bb80b07f443df23122f1ad24c3c93763394bcb76 100644 (file)
@@ -135,13 +135,6 @@ private:
 
 #endif // defined( __VISUALC__ )
 
-// Visual C++ 2005 complains about the const
-#if (defined(__VISUALC__) && __VISUALC__ >= 1400) || defined(__MWERKS__)
-#define _WX_DELETEFUNCTIONCONST
-#else
-#define _WX_DELETEFUNCTIONCONST const
-#endif
-
 #define WX_DECLARE_LIST_XO(elT, liT, decl)                                    \
     VC6_WORKAROUND(elT, liT, decl)                                            \
     decl liT : public std::list<elT>                                          \
@@ -150,7 +143,7 @@ private:
         bool m_destroy;                                                       \
     private:                                                                  \
         typedef elT _WX_LIST_ITEM_TYPE_##liT;                                 \
-        static void DeleteFunction( _WX_DELETEFUNCTIONCONST _WX_LIST_ITEM_TYPE_##liT X );       \
+        static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X );             \
     public:                                                                   \
         class compatibility_iterator                                          \
         {                                                                     \
index f5a0fc4bf75a4e8fa007a3978bbd29980dbc4045..a7d3729d087df341504e8611a647a43ccea48176 100644 (file)
@@ -13,7 +13,7 @@
 
     #undef  WX_DEFINE_LIST
     #define WX_DEFINE_LIST(name)                                        \
-        void name::DeleteFunction( _WX_DELETEFUNCTIONCONST _WX_LIST_ITEM_TYPE_##name X )  \
+        void name::DeleteFunction( _WX_LIST_ITEM_TYPE_##name X )        \
         {                                                               \
             delete X;                                                   \
         }
index bd111c8ad23b28cde57931c3ae48eb4a58930db9..25fbff411d9543de25aa62fa81c3b8b98f9f1dec 100644 (file)
@@ -758,7 +758,7 @@ wxNode *wxStringList::Prepend(const wxChar *s)
     WX_DEFINE_LIST(wxObjectList)
 
 // with wxUSE_STL wxStringList contains wxString objects, not pointers
-void wxStringListBase::DeleteFunction( _WX_DELETEFUNCTIONCONST wxString WXUNUSED(X) )
+void wxStringListBase::DeleteFunction( wxString WXUNUSED(X) )
 {
 }