From 8c3a82e526126030f848edaf477c1ead481e14e3 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 20 Sep 2018 20:15:47 -0700 Subject: [PATCH] Code cleanup: Fixing assignment operators --- common/tool/tool_manager.cpp | 2 +- pcbnew/router/pns_itemset.h | 2 +- pcbnew/router/pns_layerset.h | 2 +- pcbnew/router/pns_line.cpp | 2 +- pcbnew/router/pns_line.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 0fa7214c6b..db5b114575 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -109,7 +109,7 @@ struct TOOL_MANAGER::TOOL_STATE /// VIEW_CONTROLS settings to preserve settings when the tools are switched KIGFX::VC_SETTINGS vcSettings; - void operator=( const TOOL_STATE& aState ) + TOOL_STATE& operator=( const TOOL_STATE& aState ) { theTool = aState.theTool; idle = aState.idle; diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h index 4e02edb75a..9c88d65ec0 100644 --- a/pcbnew/router/pns_itemset.h +++ b/pcbnew/router/pns_itemset.h @@ -110,7 +110,7 @@ public: ~ITEM_SET(); - const ITEM_SET& operator=( const ITEM_SET& aOther ) + ITEM_SET& operator=( const ITEM_SET& aOther ) { m_items = aOther.m_items; return *this; diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h index 41546ee28e..1bdbbce836 100644 --- a/pcbnew/router/pns_layerset.h +++ b/pcbnew/router/pns_layerset.h @@ -58,7 +58,7 @@ public: ~LAYER_RANGE() {}; - const LAYER_RANGE& operator=( const LAYER_RANGE& aB ) + LAYER_RANGE& operator=( const LAYER_RANGE& aB ) { m_start = aB.m_start; m_end = aB.m_end; diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index b22ab3e11e..bd83594250 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -55,7 +55,7 @@ LINE::~LINE() } -const LINE& LINE::operator=( const LINE& aOther ) +LINE& LINE::operator=( const LINE& aOther ) { m_line = aOther.m_line; m_width = aOther.m_width; diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index 58ec12d59e..c52f4343ae 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -99,7 +99,7 @@ public: /// @copydoc ITEM::Clone() virtual LINE* Clone() const override; - const LINE& operator=( const LINE& aOther ); + LINE& operator=( const LINE& aOther ); ///> Assigns a shape to the line (a polyline/line chain) void SetShape( const SHAPE_LINE_CHAIN& aLine )