From 05ee63fe395834517f276dc8282fb0741be9149c Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Sat, 16 Jan 2016 22:56:58 -0500 Subject: [PATCH] Replace dangerous cast of pointer->long --- common/displlst.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/displlst.cpp b/common/displlst.cpp index b8961f6ad6..7e2eddda2d 100644 --- a/common/displlst.cpp +++ b/common/displlst.cpp @@ -161,7 +161,7 @@ void EDA_LIST_DIALOG::Append( const wxArrayString& itemList ) { long itemIndex = m_listBox->InsertItem( m_listBox->GetItemCount(), itemList[0] ); - m_listBox->SetItemData( itemIndex, (long) &(itemList[0]) ); + m_listBox->SetItemPtrData( itemIndex, wxUIntPtr( &itemList[0] ) ); // Adding the next columns content for( unsigned i = 1; i < itemList.size(); i++ ) @@ -184,7 +184,7 @@ void EDA_LIST_DIALOG::InsertItems( const std::vector< wxArrayString >& itemList, if( col == 0 ) { itemIndex = m_listBox->InsertItem( row+position, itemList[row].Item( col ) ); - m_listBox->SetItemData( itemIndex, (long) &itemList[row].Item( col ) ); + m_listBox->SetItemPtrData( itemIndex, wxUIntPtr( &itemList[row].Item( col ) ) ); } else {