Use static_cast since we've already checked the type.
This is faster and also keeps Coverity happy.
This commit is contained in:
parent
17710c15d3
commit
1591d13839
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue