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 ] )
|
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 NULL;
|
||||||
return field;
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
return NULL;
|
||||||
|
|
|
@ -271,10 +271,7 @@ public:
|
||||||
*/
|
*/
|
||||||
LIB_FIELD* FindField( const wxString& aFieldName );
|
LIB_FIELD* FindField( const wxString& aFieldName );
|
||||||
|
|
||||||
const LIB_FIELD* FindField( const wxString& aFieldName ) const
|
const LIB_FIELD* FindField( const wxString& aFieldName ) const;
|
||||||
{
|
|
||||||
return const_cast<LIB_FIELD*>( FindField( aFieldName ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return pointer to the requested field.
|
* Return pointer to the requested field.
|
||||||
|
|
Loading…
Reference in New Issue