Fix clang compile warnings.
This commit is contained in:
parent
9ff09aa784
commit
10add93d16
|
@ -881,10 +881,20 @@ LIB_FIELD* LIB_PART::FindField( const wxString& aFieldName )
|
|||
{
|
||||
for( LIB_ITEM& item : m_drawings[ LIB_FIELD_T ] )
|
||||
{
|
||||
LIB_FIELD* field = ( LIB_FIELD* ) &item;
|
||||
if( static_cast<LIB_FIELD*>( &item )->GetCanonicalName() == aFieldName )
|
||||
return static_cast<LIB_FIELD*>( &item );
|
||||
}
|
||||
|
||||
if( field->GetCanonicalName() == aFieldName )
|
||||
return field;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const LIB_FIELD* LIB_PART::FindField( const wxString& aFieldName ) const
|
||||
{
|
||||
for( const LIB_ITEM& item : m_drawings[ LIB_FIELD_T ] )
|
||||
{
|
||||
if( static_cast<const LIB_FIELD*>( &item )->GetCanonicalName() == aFieldName )
|
||||
return static_cast<const LIB_FIELD*>( &item );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
@ -271,10 +271,7 @@ public:
|
|||
*/
|
||||
LIB_FIELD* FindField( const wxString& aFieldName );
|
||||
|
||||
const LIB_FIELD* FindField( const wxString& aFieldName ) const
|
||||
{
|
||||
return const_cast<LIB_FIELD*>( FindField( aFieldName ) );
|
||||
}
|
||||
const LIB_FIELD* FindField( const wxString& aFieldName ) const;
|
||||
|
||||
/**
|
||||
* Return pointer to the requested field.
|
||||
|
|
Loading…
Reference in New Issue