Remove unnecessary TRANSFORM::operator=
The default assignment operator is significantly more efficient - often inlined, and has no branches...
This commit is contained in:
parent
0182e454c5
commit
a416f3a4e4
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2015-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -29,19 +29,6 @@
|
|||
#include <class_eda_rect.h>
|
||||
|
||||
|
||||
TRANSFORM& TRANSFORM::operator=( const TRANSFORM& aTransform )
|
||||
{
|
||||
if( this == &aTransform ) // Check for self assingnemt;
|
||||
return *this;
|
||||
|
||||
x1 = aTransform.x1;
|
||||
y1 = aTransform.y1;
|
||||
x2 = aTransform.x2;
|
||||
y2 = aTransform.y2;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
bool TRANSFORM::operator==( const TRANSFORM& aTransform ) const
|
||||
{
|
||||
return ( x1 == aTransform.x1 &&
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007-2010 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2007-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -57,8 +57,6 @@ public:
|
|||
|
||||
TRANSFORM( int ax1, int ay1, int ax2, int ay2 ) : x1( ax1 ), y1( ay1 ), x2( ax2 ), y2( ay2 ) {}
|
||||
|
||||
TRANSFORM& operator=( const TRANSFORM& aTransform );
|
||||
|
||||
bool operator==( const TRANSFORM& aTransform ) const;
|
||||
|
||||
bool operator!=( const TRANSFORM& aTransform ) const { return !( *this == aTransform ); }
|
||||
|
|
Loading…
Reference in New Issue