Code cleanup: Fixing assignment operators

This commit is contained in:
Seth Hillbrand 2018-09-20 20:15:47 -07:00
parent c0f067bf90
commit 8c3a82e526
5 changed files with 5 additions and 5 deletions

View File

@ -109,7 +109,7 @@ struct TOOL_MANAGER::TOOL_STATE
/// VIEW_CONTROLS settings to preserve settings when the tools are switched /// VIEW_CONTROLS settings to preserve settings when the tools are switched
KIGFX::VC_SETTINGS vcSettings; KIGFX::VC_SETTINGS vcSettings;
void operator=( const TOOL_STATE& aState ) TOOL_STATE& operator=( const TOOL_STATE& aState )
{ {
theTool = aState.theTool; theTool = aState.theTool;
idle = aState.idle; idle = aState.idle;

View File

@ -110,7 +110,7 @@ public:
~ITEM_SET(); ~ITEM_SET();
const ITEM_SET& operator=( const ITEM_SET& aOther ) ITEM_SET& operator=( const ITEM_SET& aOther )
{ {
m_items = aOther.m_items; m_items = aOther.m_items;
return *this; return *this;

View File

@ -58,7 +58,7 @@ public:
~LAYER_RANGE() {}; ~LAYER_RANGE() {};
const LAYER_RANGE& operator=( const LAYER_RANGE& aB ) LAYER_RANGE& operator=( const LAYER_RANGE& aB )
{ {
m_start = aB.m_start; m_start = aB.m_start;
m_end = aB.m_end; m_end = aB.m_end;

View File

@ -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_line = aOther.m_line;
m_width = aOther.m_width; m_width = aOther.m_width;

View File

@ -99,7 +99,7 @@ public:
/// @copydoc ITEM::Clone() /// @copydoc ITEM::Clone()
virtual LINE* Clone() const override; 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) ///> Assigns a shape to the line (a polyline/line chain)
void SetShape( const SHAPE_LINE_CHAIN& aLine ) void SetShape( const SHAPE_LINE_CHAIN& aLine )