From 7abf006c80ad376c7d60337c609b0226df96fc96 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 15 Jun 2016 10:27:24 +0200 Subject: [PATCH] Very minor fix: fix shadowed local vars. --- 3d-viewer/x3dmodelparser.cpp | 26 +++++++++++++------------- pcbnew/router/pns_optimizer.cpp | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index c47291cdf6..b274553319 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -433,13 +433,13 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, // Save points to vector as doubles wxStringTokenizer point_tokens( coordinate_properties[ wxT( "point" ) ] ); - double point = 0.0; + double dpoint = 0.0; while( point_tokens.HasMoreTokens() ) { - if( point_tokens.GetNextToken().ToDouble( &point ) ) + if( point_tokens.GetNextToken().ToDouble( &dpoint ) ) { - points.push_back( point ); + points.push_back( dpoint ); } else { @@ -462,24 +462,24 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, for( unsigned id = 0; id < points.size() / 3; id++ ) { int triplet_indx = id * 3; - S3D_VERTEX point( points[ triplet_indx ], + S3D_VERTEX vpoint( points[ triplet_indx ], points[ triplet_indx + 1 ], points[ triplet_indx + 2 ] ); - point.x *= scale.x; - point.y *= scale.y; - point.z *= scale.z; + vpoint.x *= scale.x; + vpoint.y *= scale.y; + vpoint.z *= scale.z; - rotate( point, rotation, angle ); + rotate( vpoint, rotation, angle ); - point.x += translation.x; - point.y += translation.y; - point.z += translation.z; + vpoint.x += translation.x; + vpoint.y += translation.y; + vpoint.z += translation.z; - m_model->m_Point.push_back( point ); + m_model->m_Point.push_back( vpoint ); // VRML - vrml_pointlist.Append( wxString::Format( wxT( "%f %f %f\n" ), point.x, point.y, point.z ) ); + vrml_pointlist.Append( wxString::Format( wxT( "%f %f %f\n" ), vpoint.x, vpoint.y, vpoint.z ) ); } vrml_points.push_back( vrml_pointlist ); diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 2e3d7d51a8..249d8b27cd 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -315,7 +315,7 @@ void LINE_RESTRICTIONS::Build( PNS_NODE* aWorld, PNS_LINE* aOriginLine, const SH for( int i = 0; i < n; i++ ) { - const VECTOR2I &v = l.CPoint( i ), v_next; + const VECTOR2I &v = l.CPoint( i ); RVERTEX r( false, 0xff ); if( aRestrictedAreaEnable )