kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24136
[PATCH] Logic reformulation in Plot_Edges_Modules
Hi,
Corrections to avoid unnecessary boolean operations
!(!a || !b) = a || b
Best Regards,
From 5903b024c6f2dcd3010a4700b4a5feb032594b33 Mon Sep 17 00:00:00 2001
From: "Patrick J.P" <patrick.pereira@xxxxxxxxx>
Date: Tue, 12 Apr 2016 18:08:49 -0300
Subject: [PATCH 1/1] Logic reformulation in Plot_Edges_Modules
Corrections to avoid unnecessary boolean operations
!(!a || !b) = a || b
Signed-off-by: Patrick J.P <patrick.pereira@xxxxxxxxx>
---
pcbnew/plot_brditems_plotter.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp
index e9d82c3..3628beb 100644
--- a/pcbnew/plot_brditems_plotter.cpp
+++ b/pcbnew/plot_brditems_plotter.cpp
@@ -354,10 +354,8 @@ void BRDITEMS_PLOTTER::Plot_Edges_Modules()
{
EDGE_MODULE* edge = dyn_cast<EDGE_MODULE*>( item );
- if( !edge || !m_layerMask[edge->GetLayer()] )
- continue;
-
- Plot_1_EdgeModule( edge );
+ if( edge || m_layerMask[edge->GetLayer()] )
+ Plot_1_EdgeModule( edge );
}
}
}
--
2.8.0
Follow ups