Use static_cast since we've already checked the type.

This is faster and also keeps Coverity happy.
This commit is contained in:
Jeff Young 2020-01-11 16:32:41 +00:00
parent 17710c15d3
commit 1591d13839
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ void SCH_VIEW::DisplayComponent( LIB_PART* aPart )
// The mandatory fields are already in place so we only add user defined fields. // The mandatory fields are already in place so we only add user defined fields.
if( item.Type() == LIB_FIELD_T ) if( item.Type() == LIB_FIELD_T )
{ {
LIB_FIELD* field = dynamic_cast< LIB_FIELD* >( &item ); LIB_FIELD* field = static_cast< LIB_FIELD* >( &item );
if( field->GetId() < MANDATORY_FIELDS ) if( field->GetId() < MANDATORY_FIELDS )
continue; continue;