Fix build error with selection class

This commit is contained in:
Ian McInerney 2021-06-06 17:26:12 +01:00
parent 527bda5d58
commit e29b61ccc1
1 changed files with 1 additions and 3 deletions

View File

@ -154,11 +154,9 @@ public:
template<class T> template<class T>
T* FirstOfKind() const T* FirstOfKind() const
{ {
auto refType = T( nullptr ).Type();
for( auto item : m_items ) for( auto item : m_items )
{ {
if( item->Type() == refType ) if( IsA<T, EDA_ITEM>( item ) )
return static_cast<T*> ( item ); return static_cast<T*> ( item );
} }