Remove unused variables plus some more fixes from CppCheck
Remove unused variables plus a few more fixes from CppCheck Remove unused variables plus a few more fixes from CppCheck
This commit is contained in:
parent
bdc41f7365
commit
99da663e82
|
@ -120,10 +120,10 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
aMsg << eol << eol;
|
||||
|
||||
if( !aBrief )
|
||||
{
|
||||
aMsg << "Build Info:" << eol;
|
||||
|
||||
if( !aBrief )
|
||||
aMsg << indent4 << "Date: " << GetBuildDate() << eol;
|
||||
}
|
||||
|
||||
aMsg << indent4 << "wxWidgets: " << wxVERSION_NUM_DOT_STRING << " (";
|
||||
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")";
|
||||
|
|
|
@ -30,7 +30,7 @@ class PAGED_DIALOG;
|
|||
class PANEL_GAL_DISPLAY_OPTIONS : public wxPanel
|
||||
{
|
||||
public:
|
||||
PANEL_GAL_DISPLAY_OPTIONS( EDA_DRAW_FRAME* aParent, PAGED_DIALOG* aWindow );
|
||||
PANEL_GAL_DISPLAY_OPTIONS( EDA_DRAW_FRAME* aFrame, PAGED_DIALOG* aParent );
|
||||
|
||||
private:
|
||||
bool TransferDataToWindow() override;
|
||||
|
|
|
@ -69,8 +69,6 @@ bool NETLIST_EXPORTER_CADSTAR::WriteNetlist( const wxString& aOutFileName, unsig
|
|||
|
||||
for( unsigned i = 0; i < sheetList.size(); i++ )
|
||||
{
|
||||
std::vector<SCH_COMPONENT*> cmps;
|
||||
|
||||
for( SCH_ITEM* item : sheetList[i].LastScreen()->Items().OfType( SCH_COMPONENT_T ) )
|
||||
{
|
||||
symbol = findNextSymbol( item, &sheetList[ i ] );
|
||||
|
|
|
@ -381,7 +381,6 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem,
|
|||
// calculate polygon corners
|
||||
// when arc is counter-clockwise, dummyGbrItem arc goes from end to start
|
||||
// and we must always create a polygon from start to end.
|
||||
wxPoint start_arc = start;
|
||||
for( int ii = 0; ii <= count; ii++ )
|
||||
{
|
||||
double rot;
|
||||
|
@ -397,8 +396,6 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem,
|
|||
end_arc = aClockwise ? end : start;
|
||||
|
||||
aGbrItem->m_Polygon.Append( VECTOR2I( end_arc + center ) );
|
||||
|
||||
start_arc = end_arc;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -421,10 +421,9 @@ void PCB_FOOTPRINT::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
|
|||
|
||||
tNode = tNode->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
if( lNode )
|
||||
lNode = lNode->GetParent();
|
||||
lNode = lNode->GetParent();
|
||||
}
|
||||
|
||||
if( lNode )
|
||||
lNode = FindNode( lNode, wxT( "layerContents" ) );
|
||||
|
|
|
@ -901,8 +901,6 @@ std::unique_ptr<PNS::ARC> PNS_KICAD_IFACE_BASE::syncArc( ARC* aArc )
|
|||
|
||||
std::unique_ptr<PNS::VIA> PNS_KICAD_IFACE_BASE::syncVia( VIA* aVia )
|
||||
{
|
||||
std::vector<std::unique_ptr<PNS::VIA>> retval;
|
||||
|
||||
PCB_LAYER_ID top, bottom;
|
||||
aVia->LayerPair( &top, &bottom );
|
||||
|
||||
|
|
|
@ -806,8 +806,6 @@ int ROUTER_TOOL::onViaCommand( const TOOL_EVENT& aEvent )
|
|||
viaType = VIATYPE::THROUGH;
|
||||
}
|
||||
|
||||
std::pair<PCB_LAYER_ID, PCB_LAYER_ID> layerPair;
|
||||
|
||||
switch( viaType )
|
||||
{
|
||||
case VIATYPE::THROUGH:
|
||||
|
|
|
@ -1206,9 +1206,6 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
|
|||
netcodeList.sort();
|
||||
netcodeList.unique();
|
||||
|
||||
// auto select trivial connections segments which are launched from the pads
|
||||
std::list<TRACK*> launchTracks;
|
||||
|
||||
for( PAD* pad : padList )
|
||||
selectConnectedTracks( *pad, STOP_NEVER );
|
||||
|
||||
|
@ -2255,7 +2252,6 @@ void SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector,
|
|||
{
|
||||
std::set<BOARD_ITEM*> preferred;
|
||||
std::set<BOARD_ITEM*> rejected;
|
||||
std::set<BOARD_ITEM*> forced;
|
||||
wxPoint where( aWhere.x, aWhere.y );
|
||||
|
||||
// footprints which are below this percentage of the largest footprint will be considered
|
||||
|
|
|
@ -2013,8 +2013,6 @@ bool VRML_LAYER::Get2DTriangles( std::vector< double >& aVertexList,
|
|||
std::list< TRIPLET_3D >::const_iterator tbeg = triplets.begin();
|
||||
std::list< TRIPLET_3D >::const_iterator tend = triplets.end();
|
||||
|
||||
std::vector< int > aIndexBot;
|
||||
|
||||
if( aTopPlane )
|
||||
{
|
||||
while( tbeg != tend )
|
||||
|
|
|
@ -954,7 +954,7 @@ bool PCBMODEL::WriteSTEP( const wxString& aFileName )
|
|||
}
|
||||
|
||||
|
||||
bool PCBMODEL::getModelLabel( const std::string aFileName, TRIPLET aScale, TDF_Label& aLabel )
|
||||
bool PCBMODEL::getModelLabel( const std::string& aFileName, TRIPLET aScale, TDF_Label& aLabel )
|
||||
{
|
||||
std::string model_key = aFileName + "_" + std::to_string( aScale.x )
|
||||
+ "_" + std::to_string( aScale.y ) + "_" + std::to_string( aScale.z );
|
||||
|
|
|
@ -99,7 +99,7 @@ class PCBMODEL
|
|||
std::list< KICADCURVE > m_curves;
|
||||
std::vector< TopoDS_Shape > m_cutouts;
|
||||
|
||||
bool getModelLabel( const std::string aFileName, TRIPLET aScale, TDF_Label& aLabel );
|
||||
bool getModelLabel( const std::string& aFileName, TRIPLET aScale, TDF_Label& aLabel );
|
||||
|
||||
bool getModelLocation( bool aBottom, DOUBLET aPosition, double aRotation,
|
||||
TRIPLET aOffset, TRIPLET aOrientation, TopLoc_Location& aLocation );
|
||||
|
|
Loading…
Reference in New Issue