From 113163257d71c5da2a7c378586d6cbe5eb7f0911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Fri, 23 Jun 2017 11:36:05 +0200 Subject: [PATCH] Fixed compilation warnings --- pcbnew/board_netlist_updater.cpp | 1 - pcbnew/board_netlist_updater.h | 1 - pcbnew/dialogs/dialog_global_deletion.cpp | 10 +++++----- pcbnew/tools/drawing_tool.cpp | 2 -- pcbnew/tools/pcb_tool.cpp | 4 ++-- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pcbnew/board_netlist_updater.cpp b/pcbnew/board_netlist_updater.cpp index 665544e256..ea097ad26e 100644 --- a/pcbnew/board_netlist_updater.cpp +++ b/pcbnew/board_netlist_updater.cpp @@ -51,7 +51,6 @@ BOARD_NETLIST_UPDATER::BOARD_NETLIST_UPDATER( PCB_EDIT_FRAME* aFrame, BOARD* aBoard ) : m_commit( aFrame ), - m_frame( aFrame ), m_board( aBoard ) { m_reporter = &NULL_REPORTER::GetInstance(); diff --git a/pcbnew/board_netlist_updater.h b/pcbnew/board_netlist_updater.h index 256722ddc6..aef46bf507 100644 --- a/pcbnew/board_netlist_updater.h +++ b/pcbnew/board_netlist_updater.h @@ -139,7 +139,6 @@ private: bool testConnectivity( NETLIST& aNetlist ); BOARD_COMMIT m_commit; - PCB_EDIT_FRAME* m_frame; BOARD* m_board; REPORTER* m_reporter; diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 649b7b82e9..c85eb92039 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -160,16 +160,16 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete() masque_layer &= layers_filter; - for( auto item : pcb->Drawings() ) + for( auto dwg : pcb->Drawings() ) { - KICAD_T type = item->Type(); - LAYER_NUM layer = item->GetLayer(); + KICAD_T type = dwg->Type(); + LAYER_NUM layer = dwg->GetLayer(); if( delAll || ( type == PCB_LINE_T && delDrawings && masque_layer[layer] ) || ( type == PCB_TEXT_T && delTexts && del_text_layers[layer] ) ) { - commit.Remove( item ); + commit.Remove( dwg ); } } } @@ -238,6 +238,6 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete() if( gen_rastnest ) m_Parent->Compile_Ratsnest( NULL, true ); - // There is a chance that some of tracks have changed their nets, so rebuild ratsnest from scratch + // There is a chance that some of tracks have changed their nets, so rebuild ratsnest from scratch m_Parent->GetCanvas()->Refresh(); } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index a6a1d340ad..88da9590cc 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1413,8 +1413,6 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent ) } } - printf( "Found zones : %d\n", foundZones.size() ); - std::sort( foundZones.begin(), foundZones.end(), [] ( const ZONE_CONTAINER* a, const ZONE_CONTAINER* b ) { return a->GetLayer() < b->GetLayer(); diff --git a/pcbnew/tools/pcb_tool.cpp b/pcbnew/tools/pcb_tool.cpp index a7aa11cd33..4651b51a6f 100644 --- a/pcbnew/tools/pcb_tool.cpp +++ b/pcbnew/tools/pcb_tool.cpp @@ -149,10 +149,10 @@ void PCB_TOOL::doInteractiveItemPlacement( INTERACTIVE_PLACER_BASE *aPlacer, if ( aOptions & IPO_SINGLE_CLICK ) { - VECTOR2I cursorPos = controls()->GetCursorPosition(); + VECTOR2I pos = controls()->GetCursorPosition(); newItem = aPlacer->CreateItem(); - newItem->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); + newItem->SetPosition( wxPoint( pos.x, pos.y ) ); preview.Add( newItem.get() ); }