Tidy some compiler warnings.

This commit is contained in:
Jeff Young 2020-04-16 14:22:19 +01:00
parent 9c8941e040
commit 37023da56f
2 changed files with 16 additions and 20 deletions

View File

@ -923,8 +923,7 @@ void SCH_SHEET::GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PA
item->m_Start = item->m_End = sheetPin->GetPosition(); item->m_Start = item->m_End = sheetPin->GetPosition();
aNetListItems.push_back( item ); aNetListItems.push_back( item );
SCH_CONNECTION conn; if( SCH_CONNECTION::IsBusLabel( sheetPin->GetText() ) )
if( conn.IsBusLabel( sheetPin->GetText() ) )
item->ConvertBusToNetListItems( aNetListItems ); item->ConvertBusToNetListItems( aNetListItems );
} }
} }

View File

@ -99,12 +99,12 @@ static int* TemplateShape[5][4] =
SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType, int aMarkupFlags ) : SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType, int aMarkupFlags ) :
SCH_ITEM( NULL, aType ), SCH_ITEM( NULL, aType ),
EDA_TEXT( text, aMarkupFlags ), EDA_TEXT( text, aMarkupFlags ),
m_shape( PINSHEETLABEL_SHAPE::PS_INPUT ) m_shape( PINSHEETLABEL_SHAPE::PS_INPUT ),
m_isDangling( false ),
m_connectionType( CONNECTION_TYPE::NONE ),
m_spin_style( LABEL_SPIN_STYLE::LEFT )
{ {
m_Layer = LAYER_NOTES; m_Layer = LAYER_NOTES;
m_isDangling = false;
m_connectionType = CONNECTION_TYPE::NONE;
m_spin_style = LABEL_SPIN_STYLE::LEFT;
SetTextPos( pos ); SetTextPos( pos );
SetMultilineAllowed( true ); SetMultilineAllowed( true );
@ -112,14 +112,13 @@ SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType, int
SCH_TEXT::SCH_TEXT( const SCH_TEXT& aText ) : SCH_TEXT::SCH_TEXT( const SCH_TEXT& aText ) :
SCH_ITEM( aText ), SCH_ITEM( aText ),
EDA_TEXT( aText ) EDA_TEXT( aText ),
{ m_shape( aText.m_shape ),
m_shape = aText.m_shape; m_isDangling( aText.m_isDangling ),
m_isDangling = aText.m_isDangling; m_connectionType( aText.m_connectionType ),
m_spin_style = aText.m_spin_style; m_spin_style( aText.m_spin_style )
m_connectionType = aText.m_connectionType; { }
}
EDA_ITEM* SCH_TEXT::Clone() const EDA_ITEM* SCH_TEXT::Clone() const
@ -180,8 +179,6 @@ void SCH_TEXT::MirrorX( int aXaxis_position )
void SCH_TEXT::Rotate( wxPoint aPosition ) void SCH_TEXT::Rotate( wxPoint aPosition )
{ {
int dy = 0;
wxPoint pt = GetTextPos(); wxPoint pt = GetTextPos();
RotatePoint( &pt, aPosition, 900 ); RotatePoint( &pt, aPosition, 900 );
SetTextPos( pt ); SetTextPos( pt );
@ -190,6 +187,8 @@ void SCH_TEXT::Rotate( wxPoint aPosition )
if( this->Type() == SCH_TEXT_T ) if( this->Type() == SCH_TEXT_T )
{ {
int dy = 0;
switch( GetLabelSpinStyle() ) switch( GetLabelSpinStyle() )
{ {
case LABEL_SPIN_STYLE::LEFT: case LABEL_SPIN_STYLE::LEFT:
@ -199,7 +198,6 @@ void SCH_TEXT::Rotate( wxPoint aPosition )
case LABEL_SPIN_STYLE::UP: case LABEL_SPIN_STYLE::UP:
case LABEL_SPIN_STYLE::BOTTOM: case LABEL_SPIN_STYLE::BOTTOM:
default: default:
dy = 0;
dy = 0; dy = 0;
break; break;
} }
@ -557,7 +555,7 @@ void SCH_TEXT::GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
aNetListItems.push_back( item ); aNetListItems.push_back( item );
// If a bus connects to label // If a bus connects to label
if( Connection( *aSheetPath )->IsBusLabel( GetText() ) ) if( SCH_CONNECTION::IsBusLabel( GetText() ) )
item->ConvertBusToNetListItems( aNetListItems ); item->ConvertBusToNetListItems( aNetListItems );
} }
@ -994,7 +992,6 @@ const EDA_RECT SCH_GLOBALLABEL::GetBoundingBox() const
x = GetTextPos().x; x = GetTextPos().x;
y = GetTextPos().y; y = GetTextPos().y;
dx = dy = 0;
// Use the maximum clamped pen width to give us a bit of wiggle room // Use the maximum clamped pen width to give us a bit of wiggle room
int width = Clamp_Text_PenSize( GetTextSize().x, GetTextSize(), IsBold() ); int width = Clamp_Text_PenSize( GetTextSize().x, GetTextSize(), IsBold() );