]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/list.h
distribute only the extra, free, space according to the items proportions in wxBoxSiz...
[wxWidgets.git] / 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