From 8a7afe4dfef33756855c0e7bd38cf20d0d9a9e2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 15 Apr 2007 18:47:19 +0000 Subject: [PATCH] compilation fix for VC6 with wxUSE_STL=1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index 289d762b58..6324dd1232 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -128,11 +128,18 @@ private: bool operator()(const elT X, const elT Y) const \ { \ return m_CompFunc ? \ - ( m_CompFunc( X, Y ) < 0 ) : \ + ( m_CompFunc( wxListCastElementToVoidPtr(X), \ + wxListCastElementToVoidPtr(Y) ) < 0 ) : \ ( X > Y ); \ } \ }; +// helper for std::greater above: +template +inline const void *wxListCastElementToVoidPtr(const T* ptr) { return ptr; } +inline const void *wxListCastElementToVoidPtr(const wxString& str) + { return (const char*)str; } + #endif // VC6/!VC6 /* @@ -1217,10 +1224,10 @@ public: // default #ifdef wxWARN_COMPAT_LIST_USE wxStringList(); - wxDEPRECATED( wxStringList(const wxChar *first ...) ); + wxDEPRECATED( wxStringList(const wxChar *first ...) ); // FIXME-UTF8 #else wxStringList(); - wxStringList(const wxChar *first ...); + wxStringList(const wxChar *first ...); // FIXME-UTF8 #endif // copying the string list: the strings are copied, too (extremely -- 2.45.2