From 8377ebb0e1104fd85ea57d17ba7cdba272164f52 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 6 Jun 2021 15:30:31 -0400 Subject: [PATCH] Fix msvc warnings --- 3d-viewer/3d_rendering/image.cpp | 6 +++--- pcbnew/router/pns_node.cpp | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/3d-viewer/3d_rendering/image.cpp b/3d-viewer/3d_rendering/image.cpp index e6cbf603dc..ff26d5d5da 100644 --- a/3d-viewer/3d_rendering/image.cpp +++ b/3d-viewer/3d_rendering/image.cpp @@ -542,15 +542,15 @@ void IMAGE::EfxFilter_SkipCenter( IMAGE* aInImg, IMAGE_FILTER aFilterType, unsig { int yc = iy - yCenter; - yc = yc * yc; + unsigned int ycsq = yc * yc; for( size_t ix = 0; ix < m_width; ix++ ) { int xc = ix - xCenter; - xc = xc * xc; + unsigned int xcsq = xc * xc; - if( ( xc + yc ) < radiusSquared ) + if( ( xcsq + ycsq ) < radiusSquared ) { const unsigned int offset = ix + iy * m_width; diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 2dffa07f1b..c3883244aa 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -1053,8 +1053,6 @@ int NODE::FindLinesBetweenJoints( const JOINT& aA, const JOINT& aB, std::vector< void NODE::FixupVirtualVias() { - int n; - std::vector vvias; for( auto& joint : m_joints )