From 04a462e48f6b960715bfaaaae5b399b2472e4282 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 19 Jun 2018 09:59:09 +0200 Subject: [PATCH] kicad2step: Converted #defines to constexprs --- utils/kicad2step/pcb/oce_utils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/kicad2step/pcb/oce_utils.cpp b/utils/kicad2step/pcb/oce_utils.cpp index 9342ec88c6..189c7d76f5 100644 --- a/utils/kicad2step/pcb/oce_utils.cpp +++ b/utils/kicad2step/pcb/oce_utils.cpp @@ -75,16 +75,16 @@ #include #include -#define USER_PREC (1e-4) -#define USER_ANGLE_PREC (1e-6) +static constexpr double USER_PREC = 1e-4; +static constexpr double USER_ANGLE_PREC = 1e-6; // minimum PCB thickness in mm (2 microns assumes a very thin polyimide film) -#define THICKNESS_MIN (0.002) +static constexpr double THICKNESS_MIN = 0.002; // default PCB thickness in mm -#define THICKNESS_DEFAULT (1.6) +static constexpr double THICKNESS_DEFAULT = 1.6; // nominal offset from the board -#define BOARD_OFFSET (0.05 ) +static constexpr double BOARD_OFFSET = 0.05; // min. length**2 below which 2 points are considered coincident -#define MIN_LENGTH2 (0.0001) // = 0.01*0.01 +static constexpr double MIN_LENGTH2 = 0.0001; // = 0.01*0.01 static void getEndPoints( const KICADCURVE& aCurve, double& spx0, double& spy0, double& epx0, double& epy0 )