From 3145829b77edeb3740070e495fe2e32e5de2bec1 Mon Sep 17 00:00:00 2001 From: Russell Oliver Date: Wed, 11 Oct 2017 21:33:37 +1100 Subject: [PATCH] Fix compiler redefined warnings for FMT_IU --- common/eda_text.cpp | 8 ++++++-- eeschema/sch_item_struct.h | 2 -- include/class_board_item.h | 3 --- pcbnew/class_netclass.cpp | 4 ++++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common/eda_text.cpp b/common/eda_text.cpp index e577675436..93b2e82f06 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -38,9 +38,13 @@ // Conversion to application internal units defined at build time. #if defined( PCBNEW ) - #include // for FMT_IU + #include + #define FMT_IU BOARD_ITEM::FormatInternalUnits + #define FMT_ANGLE BOARD_ITEM::FormatAngle #elif defined( EESCHEMA ) - #include // for FMT_IU + #include + #define FMT_IU SCH_ITEM::FormatInternalUnits + #define FMT_ANGLE SCH_ITEM::FormatAngle #elif defined( GERBVIEW ) #elif defined( PL_EDITOR ) #include diff --git a/eeschema/sch_item_struct.h b/eeschema/sch_item_struct.h index 112b39c422..a532561e80 100644 --- a/eeschema/sch_item_struct.h +++ b/eeschema/sch_item_struct.h @@ -51,8 +51,6 @@ typedef SCH_ITEMS::iterator SCH_ITEMS_ITR; typedef std::vector< SCH_ITEMS_ITR > SCH_ITEMS_ITRS; -#define FMT_IU SCH_ITEM::FormatInternalUnits -#define FMT_ANGLE SCH_ITEM::FormatAngle /** diff --git a/include/class_board_item.h b/include/class_board_item.h index 2921a59b30..9c2c541251 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -35,9 +35,6 @@ #include #include -/// Abbrevation for fomatting internal units to a string. -#define FMT_IU BOARD_ITEM::FormatInternalUnits -#define FMT_ANGLE BOARD_ITEM::FormatAngle class BOARD; class BOARD_ITEM_CONTAINER; diff --git a/pcbnew/class_netclass.cpp b/pcbnew/class_netclass.cpp index 37532adbf7..bd5b6f6ceb 100644 --- a/pcbnew/class_netclass.cpp +++ b/pcbnew/class_netclass.cpp @@ -33,6 +33,10 @@ #include #include +/// Abbrevation for fomatting internal units to a string. +#define FMT_IU BOARD_ITEM::FormatInternalUnits +#define FMT_ANGLE BOARD_ITEM::FormatAngle + // This will get mapped to "kicad_default" in the specctra_export. const char NETCLASS::Default[] = "Default";