]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1392288 ] FIX: Bug 1306671 Build Error in list.h with VC2005
authorJulian Smart <julian@anthemion.co.uk>
Tue, 17 Jan 2006 19:02:39 +0000 (19:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 17 Jan 2006 19:02:39 +0000 (19:02 +0000)
By Kevin J Bluck, with mods by JS

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

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

index fb597e90aad579fea0852d98b53d1dea290d937f..47281cb1d5275ab6d17538a04050639b92cbb24a 100644 (file)
@@ -135,6 +135,13 @@ private:
 
 #endif // defined( __VISUALC__ )
 
+// Visual C++ 2005 complains about the const
+#if defined(__VISUALC__) && __VISUALC__ >= 1400
+#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>                                          \
@@ -143,7 +150,7 @@ private:
         bool m_destroy;                                                       \
     private:                                                                  \
         typedef elT _WX_LIST_ITEM_TYPE_##liT;                                 \
-        static void DeleteFunction( const _WX_LIST_ITEM_TYPE_##liT X );       \
+        static void DeleteFunction( _WX_DELETEFUNCTIONCONST _WX_LIST_ITEM_TYPE_##liT X );       \
     public:                                                                   \
         class compatibility_iterator                                          \
         {                                                                     \
index 11d0196a4e99f9cc09161b3f11f084a4143b76f7..f5a0fc4bf75a4e8fa007a3978bbd29980dbc4045 100644 (file)
@@ -13,7 +13,7 @@
 
     #undef  WX_DEFINE_LIST
     #define WX_DEFINE_LIST(name)                                        \
-        void name::DeleteFunction( const _WX_LIST_ITEM_TYPE_##name X )  \
+        void name::DeleteFunction( _WX_DELETEFUNCTIONCONST _WX_LIST_ITEM_TYPE_##name X )  \
         {                                                               \
             delete X;                                                   \
         }