← Back to team overview

kicad-developers team mailing list archive

clean.cpp little bug fix

 

Hi

I noticed little conflict between comment and code in /pcbnew/clean.cpp
file. I think comment is right, so I suggest to change code this way.

Heikki
From 7bdedaec940728a2e0a0f808f761a5c92b16546a Mon Sep 17 00:00:00 2001
From: heikki <hei6mail@xxxxxxxxx>
Date: Wed, 28 Sep 2016 12:17:34 +0300
Subject: [PATCH 4/4] clean.cpp error fix
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.7.4"

This is a multi-part message in MIME format.
--------------2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 pcbnew/clean.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


--------------2.7.4
Content-Type: text/x-patch; name="0004-clean.cpp-error-fix.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0004-clean.cpp-error-fix.patch"

diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp
index 3c81a67..845e27b 100644
--- a/pcbnew/clean.cpp
+++ b/pcbnew/clean.cpp
@@ -455,8 +455,8 @@ bool TRACKS_CLEANER::remove_duplicates_of_track( const TRACK *aTrack )
 
         // Must be of the same type, on the same layer and the endpoints
         // must be the same (maybe swapped)
-        if( (aTrack->Type() != other->Type()) &&
-            (aTrack->GetLayer() != other->GetLayer()) )
+        if( (aTrack->Type() == other->Type()) &&
+            (aTrack->GetLayer() == other->GetLayer()) )
         {
             if( ((aTrack->GetStart() == other->GetStart()) &&
                  (aTrack->GetEnd() == other->GetEnd())) ||

--------------2.7.4--



Follow ups