]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix for VC6 with wxUSE_STL=1
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 15 Apr 2007 18:47:19 +0000 (18:47 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 15 Apr 2007 18:47:19 +0000 (18:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/list.h

index 289d762b58c5283d0eaf7a8721fce8e23e32cc35..6324dd12327c27ddc0787db32f154e55fc53d8ca 100644 (file)
@@ -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<elT> above:
+template<typename T>
+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