Replace dangerous cast of pointer->long

This commit is contained in:
Mark Roszko 2016-01-16 22:56:58 -05:00 committed by Chris Pavlina
parent a9216b9a32
commit 05ee63fe39
1 changed files with 2 additions and 2 deletions

View File

@ -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
{