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:
Václav Slavík
2011-08-10 15:21:22 +00:00
parent 3c6cc33082
commit d5c4a81f2e
5 changed files with 19 additions and 17 deletions

View File

@@ -406,7 +406,7 @@ int LINKAGEMODE wxGenericTreeModelNodeCmp( wxDataViewTreeNode ** node1,
int LINKAGEMODE wxGenericTreeModelItemCmp( void ** id1, void ** id2)
{
return g_model->Compare( *id1, *id2, g_column, g_asending );
return g_model->Compare( wxDataViewItem(*id1), wxDataViewItem(*id2), g_column, g_asending );
}
@@ -2702,7 +2702,7 @@ public:
if( node->GetNodes().GetCount() == 0)
{
int index = static_cast<int>(row) - current - 1;
ret = node->GetChildren().Item( index );
ret = wxDataViewItem(node->GetChildren().Item( index ));
return DoJob::OK;
}
return DoJob::CONT;