Fix a compil issue on GCC
This commit is contained in:
parent
78087597cd
commit
25f1f7b0df
|
@ -37,32 +37,33 @@ SEARCH_PANE_LISTVIEW::SEARCH_PANE_LISTVIEW( SEARCH_HANDLER* handler, wxWindow* p
|
|||
}
|
||||
|
||||
|
||||
std::vector<long> SEARCH_PANE_LISTVIEW::GetSelectRowsList()
|
||||
void SEARCH_PANE_LISTVIEW::GetSelectRowsList( std::vector<long>& aSelectedList )
|
||||
{
|
||||
std::vector<long> selectedIdxList;
|
||||
long idx = GetFirstSelected();
|
||||
selectedIdxList.emplace_back( idx );
|
||||
long idx = GetFirstSelected();
|
||||
aSelectedList.emplace_back( idx );
|
||||
|
||||
idx = GetNextSelected( idx );
|
||||
while( idx > 0 )
|
||||
{
|
||||
selectedIdxList.emplace_back( idx );
|
||||
aSelectedList.emplace_back( idx );
|
||||
idx = GetNextSelected( idx );
|
||||
}
|
||||
|
||||
return selectedIdxList;
|
||||
}
|
||||
|
||||
|
||||
void SEARCH_PANE_LISTVIEW::OnItemSelected( wxListEvent& aEvent )
|
||||
{
|
||||
m_handler->SelectItems( GetSelectRowsList() );
|
||||
std::vector<long> list;
|
||||
GetSelectRowsList( list );
|
||||
m_handler->SelectItems( list );
|
||||
}
|
||||
|
||||
|
||||
void SEARCH_PANE_LISTVIEW::OnItemDeselected( wxListEvent& aEvent )
|
||||
{
|
||||
m_handler->SelectItems( GetSelectRowsList() );
|
||||
std::vector<long> list;
|
||||
GetSelectRowsList( list );
|
||||
m_handler->SelectItems( list );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ protected:
|
|||
void OnItemSelected( wxListEvent& aEvent );
|
||||
void OnItemDeselected( wxListEvent& aEvent );
|
||||
|
||||
std::vector<long> GetSelectRowsList();
|
||||
void GetSelectRowsList( std::vector<long>& aSelectedList );
|
||||
|
||||
private:
|
||||
SEARCH_HANDLER* m_handler;
|
||||
|
|
|
@ -87,7 +87,7 @@ void FOOTPRINT_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
|
|||
std::vector<EDA_ITEM*> selectedItems;
|
||||
for( long row : aItemRows )
|
||||
{
|
||||
if( row < m_hitlist.size() )
|
||||
if( row < (long)m_hitlist.size() )
|
||||
{
|
||||
FOOTPRINT* fp = m_hitlist[row];
|
||||
selectedItems.push_back( fp );
|
||||
|
@ -170,7 +170,7 @@ void ZONE_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
|
|||
std::vector<EDA_ITEM*> selectedItems;
|
||||
for( long row : aItemRows )
|
||||
{
|
||||
if( row < m_hitlist.size() )
|
||||
if( row < (long)m_hitlist.size() )
|
||||
{
|
||||
ZONE* zone = m_hitlist[row];
|
||||
selectedItems.push_back( zone );
|
||||
|
@ -263,7 +263,7 @@ void TEXT_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
|
|||
std::vector<EDA_ITEM*> selectedItems;
|
||||
for( long row : aItemRows )
|
||||
{
|
||||
if( row < m_hitlist.size() )
|
||||
if( row < (long)m_hitlist.size() )
|
||||
{
|
||||
BOARD_ITEM* text = m_hitlist[row];
|
||||
selectedItems.push_back( text );
|
||||
|
|
Loading…
Reference in New Issue