Browse Source

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
6.0.7
Dominik Wernberger 5 years ago
committed by Ian McInerney
parent
commit
99da663e82
  1. 4
      common/build_version.cpp
  2. 2
      common/dialogs/panel_gal_display_options.h
  3. 2
      eeschema/netlist_exporters/netlist_exporter_cadstar.cpp
  4. 3
      gerbview/rs274d.cpp
  5. 5
      pcbnew/plugins/pcad/pcb_footprint.cpp
  6. 2
      pcbnew/router/pns_kicad_iface.cpp
  7. 2
      pcbnew/router/router_tool.cpp
  8. 4
      pcbnew/tools/selection_tool.cpp
  9. 2
      utils/idftools/vrml_layer.cpp
  10. 2
      utils/kicad2step/pcb/oce_utils.cpp
  11. 2
      utils/kicad2step/pcb/oce_utils.h

4
common/build_version.cpp

@ -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 ")";

2
common/dialogs/panel_gal_display_options.h

@ -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;

2
eeschema/netlist_exporters/netlist_exporter_cadstar.cpp

@ -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 ] );

3
gerbview/rs274d.cpp

@ -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;
}
}

5
pcbnew/plugins/pcad/pcb_footprint.cpp

@ -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" ) );

2
pcbnew/router/pns_kicad_iface.cpp

@ -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 );

2
pcbnew/router/router_tool.cpp

@ -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:

4
pcbnew/tools/selection_tool.cpp

@ -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

2
utils/idftools/vrml_layer.cpp

@ -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 )

2
utils/kicad2step/pcb/oce_utils.cpp

@ -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 );

2
utils/kicad2step/pcb/oce_utils.h

@ -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…
Cancel
Save