← Back to team overview

kicad-developers team mailing list archive

[PATCH 3/5] Make Show() dependent on DEBUG preprocessor symbol

 

This function is only used for builds with -DDEBUG, so hide it in derived
classes as well.
---
 include/worksheet_viewitem.h        | 2 ++
 pcbnew/ratsnest_viewitem.h          | 2 ++
 pcbnew/router/router_preview_item.h | 2 ++
 pcbnew/tools/bright_box.h           | 2 ++
 pcbnew/tools/edit_points.h          | 2 ++
 pcbnew/tools/selection_area.h       | 2 ++
 6 files changed, 12 insertions(+)

diff --git a/include/worksheet_viewitem.h b/include/worksheet_viewitem.h
index ff0c4df..7997825 100644
--- a/include/worksheet_viewitem.h
+++ b/include/worksheet_viewitem.h
@@ -123,10 +123,12 @@ public:
     /// @copydoc VIEW_ITEM::ViewGetLayers()
     void ViewGetLayers( int aLayers[], int& aCount ) const;
 
+#if defined(DEBUG)
     /// @copydoc EDA_ITEM::Show()
     void Show( int x, std::ostream& st ) const
     {
     }
+#endif
 
     /** Get class name
      * @return  string "WORKSHEET_VIEWITEM"
diff --git a/pcbnew/ratsnest_viewitem.h b/pcbnew/ratsnest_viewitem.h
index 63cf761..970859b 100644
--- a/pcbnew/ratsnest_viewitem.h
+++ b/pcbnew/ratsnest_viewitem.h
@@ -52,10 +52,12 @@ public:
     /// @copydoc VIEW_ITEM::ViewGetLayers()
     void ViewGetLayers( int aLayers[], int& aCount ) const;
 
+#if defined(DEBUG)
     /// @copydoc EDA_ITEM::Show()
     void Show( int x, std::ostream& st ) const
     {
     }
+#endif
 
     /** Get class name
      * @return  string "RATSNEST_VIEWITEM"
diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h
index 294fcdf..6344dc7 100644
--- a/pcbnew/router/router_preview_item.h
+++ b/pcbnew/router/router_preview_item.h
@@ -72,7 +72,9 @@ public:
         m_clearance = aClearance;
     }
 
+#if defined(DEBUG)
     void Show( int aA, std::ostream& aB ) const {};
+#endif
 
     /** Get class name
      * @return  string "ROUTER_PREVIEW_ITEM"
diff --git a/pcbnew/tools/bright_box.h b/pcbnew/tools/bright_box.h
index 1bcfb6a..9276305 100644
--- a/pcbnew/tools/bright_box.h
+++ b/pcbnew/tools/bright_box.h
@@ -55,9 +55,11 @@ public:
         aCount = 1;
     }
 
+#if defined(DEBUG)
     void Show( int x, std::ostream& st ) const
     {
     }
+#endif
 
     /** Get class name
      * @return  string "BRIGHT_BOX"
diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h
index 2e62c2a..02743e0 100644
--- a/pcbnew/tools/edit_points.h
+++ b/pcbnew/tools/edit_points.h
@@ -503,9 +503,11 @@ public:
         aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY );
     }
 
+#if defined(DEBUG)
     void Show( int x, std::ostream& st ) const
     {
     }
+#endif
 
     /** Get class name
      * @return  string "EDIT_POINTS"
diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h
index 7072bb6..e177c37 100644
--- a/pcbnew/tools/selection_area.h
+++ b/pcbnew/tools/selection_area.h
@@ -63,9 +63,11 @@ public:
         m_end = aEnd;
     }
 
+#if defined(DEBUG)
     void Show( int x, std::ostream& st ) const
     {
     }
+#endif
 
     /** Get class name
      * @return  string "SELECTION_AREA"
-- 
2.1.4



Follow ups

References