From 1794103babb9da5387ff71b43f3bd0aa6d2413e2 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Fri, 3 Feb 2006 18:26:55 +0000 Subject: [PATCH] DeleteFunction argument should be non-const since it 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 | 9 +-------- include/wx/listimpl.cpp | 2 +- src/common/list.cpp | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index a83cff4166..bb80b07f44 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -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 \ @@ -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 \ { \ diff --git a/include/wx/listimpl.cpp b/include/wx/listimpl.cpp index f5a0fc4bf7..a7d3729d08 100644 --- a/include/wx/listimpl.cpp +++ b/include/wx/listimpl.cpp @@ -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; \ } diff --git a/src/common/list.cpp b/src/common/list.cpp index bd111c8ad2..25fbff411d 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -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) ) { } -- 2.45.2