fix shadowed local variables

This commit is contained in:
jean-pierre charras 2016-11-25 15:07:23 +01:00
parent fd54d394bd
commit bcfc1e7a3f
4 changed files with 9 additions and 10 deletions

View File

@ -528,16 +528,16 @@ bool LINE_PLACER::routeHead( const VECTOR2I& aP, LINE& aNewHead )
bool LINE_PLACER::optimizeTailHeadTransition() bool LINE_PLACER::optimizeTailHeadTransition()
{ {
LINE tmp = Trace(); LINE linetmp = Trace();
if( OPTIMIZER::Optimize( &tmp, OPTIMIZER::FANOUT_CLEANUP, m_currentNode ) ) if( OPTIMIZER::Optimize( &linetmp, OPTIMIZER::FANOUT_CLEANUP, m_currentNode ) )
{ {
if( tmp.SegmentCount() < 1 ) if( linetmp.SegmentCount() < 1 )
return false; return false;
m_head = tmp; m_head = linetmp;
m_p_start = tmp.CLine().CPoint( 0 ); m_p_start = linetmp.CLine().CPoint( 0 );
m_direction = DIRECTION_45( tmp.CSegment( 0 ) ); m_direction = DIRECTION_45( linetmp.CSegment( 0 ) );
m_tail.Line().Clear(); m_tail.Line().Clear();
return true; return true;

View File

@ -347,7 +347,7 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aItem, int aKindMask,
if( aLine.EndsWithVia() ) if( aLine.EndsWithVia() )
{ {
int clearance = GetClearance( obs.m_item, &aLine.Via() ); clearance = GetClearance( obs.m_item, &aLine.Via() );
SHAPE_LINE_CHAIN viaHull = aLine.Via().Hull( clearance, aItem->Width() ); SHAPE_LINE_CHAIN viaHull = aLine.Via().Hull( clearance, aItem->Width() );

View File

@ -216,9 +216,9 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
lockOverride = true; lockOverride = true;
// Save items, so changes can be undone // Save items, so changes can be undone
selection.ForAll<BOARD_ITEM>( [&](BOARD_ITEM* item) selection.ForAll<BOARD_ITEM>( [&](BOARD_ITEM* brd_item)
{ {
m_commit->Modify( item ); m_commit->Modify( brd_item );
} ); } );
m_cursor = controls->GetCursorPosition(); m_cursor = controls->GetCursorPosition();

View File

@ -778,7 +778,6 @@ void POINT_EDITOR::addCorner( const VECTOR2I& aBreakPoint )
if( segment->GetShape() == S_SEGMENT ) if( segment->GetShape() == S_SEGMENT )
{ {
BOARD_COMMIT commit( frame );
commit.Modify( segment ); commit.Modify( segment );
SEG seg( segment->GetStart(), segment->GetEnd() ); SEG seg( segment->GetStart(), segment->GetEnd() );