Skip to content
Permalink
Browse files

remove dead code in qgssinglesymbolrendererv2

  • Loading branch information
vmora committed Jan 24, 2014
1 parent 569e571 commit 37efe9198be3990eef866b4fe640be7a144fa394
@@ -35,35 +35,6 @@ QgsSingleSymbolRendererV2::QgsSingleSymbolRendererV2( QgsSymbolV2* symbol )
Q_ASSERT( symbol );
}

// we need to clone symbol
QgsSingleSymbolRendererV2::QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & src )
: QgsFeatureRendererV2( "singleSymbol" )
, mSymbol( src.mSymbol.data() ? src.mSymbol->clone() : NULL )
, mRotation( src.mRotation.data() ? new QgsExpression( src.mRotation->expression() ) : NULL )
, mSizeScale( src.mSizeScale.data() ? new QgsExpression( src.mSizeScale->expression() ) : NULL )
, mScaleMethod( src.mScaleMethod )
, mTempSymbol( src.mTempSymbol.data() ? src.mTempSymbol->clone() : NULL )
{
}

// this is a copy + swap idiom implementation
// the copy is done with the 'pass by value'
QgsSingleSymbolRendererV2 & QgsSingleSymbolRendererV2::operator=( QgsSingleSymbolRendererV2 other )
{
swap( other );
return *this;
}

void QgsSingleSymbolRendererV2::swap( QgsSingleSymbolRendererV2 & other )
{
qSwap( mSymbol, other.mSymbol );
qSwap( mRotation, other.mRotation );
qSwap( mSizeScale, other.mSizeScale );
qSwap( mScaleMethod, other.mScaleMethod );
qSwap( mTempSymbol, other.mTempSymbol );
qSwap( mOrigSize, other.mOrigSize );
}

QgsSingleSymbolRendererV2::~QgsSingleSymbolRendererV2()
{
}
@@ -26,9 +26,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
public:

QgsSingleSymbolRendererV2( QgsSymbolV2* symbol );
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
QgsSingleSymbolRendererV2 & operator=( QgsSingleSymbolRendererV2 other );


virtual ~QgsSingleSymbolRendererV2();

@@ -102,9 +99,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
// temporary stuff for rendering
QScopedPointer<QgsSymbolV2> mTempSymbol;
double mOrigSize;

// for copy and swap idiom for assignment operator
void swap( QgsSingleSymbolRendererV2 & other );
};


0 comments on commit 37efe91

Please sign in to comment.
You can’t perform that action at this time.