Make the wxDataViewItem(void*) constructor explicit.
Not having this as an implicit one made it possible to create wxDataViewItem from any pointer without realizing it, leading to hard to debug crashes later. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -300,7 +300,7 @@ private:
|
||||
static
|
||||
int LINKAGEMODE wxGtkTreeModelChildCmp( void** id1, void** id2 )
|
||||
{
|
||||
int ret = gs_internal->GetDataViewModel()->Compare( *id1, *id2,
|
||||
int ret = gs_internal->GetDataViewModel()->Compare( wxDataViewItem(*id1), wxDataViewItem(*id2),
|
||||
gs_internal->GetSortColumn(), (gs_internal->GetSortOrder() == GTK_SORT_ASCENDING) );
|
||||
|
||||
return ret;
|
||||
@@ -3334,7 +3334,7 @@ int wxGtkTreeModelChildWithPosCmp( const void* data1, const void* data2, const v
|
||||
static
|
||||
int LINKAGEMODE wxGtkTreeModelChildPtrCmp( void*** data1, void*** data2 )
|
||||
{
|
||||
return gs_internal->GetDataViewModel()->Compare( **data1, **data2,
|
||||
return gs_internal->GetDataViewModel()->Compare( wxDataViewItem(**data1), wxDataViewItem(**data2),
|
||||
gs_internal->GetSortColumn(), (gs_internal->GetSortOrder() == GTK_SORT_ASCENDING) );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user