Make wxListCtrl sort function take wxIntPtr, not long, arguments.
As the arguments to the sort function contain the client data associated with the items, they may be pointers and hence of greater size than long in Win64 builds. Use wxIntPtr instead of long everywhere to fix this. Notice that this doesn't break compatibility for 32 bit code where long can still be used as it is the same as wxIntPtr there after the previous commit. Closes #4309. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static
|
||||
int wxCALLBACK wxFileDataNameCompare( long data1, long data2, wxIntPtr sortOrder)
|
||||
int wxCALLBACK wxFileDataNameCompare( wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder)
|
||||
{
|
||||
wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
|
||||
wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
|
||||
@@ -71,7 +71,7 @@ int wxCALLBACK wxFileDataNameCompare( long data1, long data2, wxIntPtr sortOrder
|
||||
}
|
||||
|
||||
static
|
||||
int wxCALLBACK wxFileDataSizeCompare(long data1, long data2, wxIntPtr sortOrder)
|
||||
int wxCALLBACK wxFileDataSizeCompare(wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder)
|
||||
{
|
||||
wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
|
||||
wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
|
||||
@@ -93,7 +93,7 @@ int wxCALLBACK wxFileDataSizeCompare(long data1, long data2, wxIntPtr sortOrder)
|
||||
}
|
||||
|
||||
static
|
||||
int wxCALLBACK wxFileDataTypeCompare(long data1, long data2, wxIntPtr sortOrder)
|
||||
int wxCALLBACK wxFileDataTypeCompare(wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder)
|
||||
{
|
||||
wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
|
||||
wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
|
||||
@@ -115,7 +115,7 @@ int wxCALLBACK wxFileDataTypeCompare(long data1, long data2, wxIntPtr sortOrder)
|
||||
}
|
||||
|
||||
static
|
||||
int wxCALLBACK wxFileDataTimeCompare(long data1, long data2, wxIntPtr sortOrder)
|
||||
int wxCALLBACK wxFileDataTimeCompare(wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder)
|
||||
{
|
||||
wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1);
|
||||
wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2);
|
||||
|
||||
Reference in New Issue
Block a user