From bbf8a0fa06f09605bc556413e099d835d9a1655c Mon Sep 17 00:00:00 2001 From: John Beard Date: Fri, 27 Jan 2017 23:32:44 +0800 Subject: [PATCH] Tidy consts in class BOARD Add some consts to "getters" in this class. Remove const from return type of static return-by-value getter - this has no effect on the caller except disabling move operations and forcing copy operations. --- pcbnew/class_board.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 0ad5e9d89a..e43fa5aae1 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -353,7 +353,7 @@ public: * Function GetHighLightNetCode * @return netcode of net to highlight (-1 when no net selected) */ - int GetHighLightNetCode() { return m_highLight.m_netCode; } + int GetHighLightNetCode() const { return m_highLight.m_netCode; } /** * Function SetHighLightNet @@ -368,7 +368,7 @@ public: * Function IsHighLightNetON * @return true if a net is currently highlighted */ - bool IsHighLightNetON() { return m_highLight.m_highLightOn; } + bool IsHighLightNetON() const { return m_highLight.m_highLightOn; } /** * Function HighLightOFF @@ -645,7 +645,7 @@ public: * @return const wxString - containing the layer name or "BAD INDEX" if aLayerId * is not legal */ - static const wxString GetStandardLayerName( LAYER_ID aLayerId ) + static wxString GetStandardLayerName( LAYER_ID aLayerId ) { // a BOARD's standard layer name is the LAYER_ID fixed name return LSET::Name( aLayerId );