Skip to content
Permalink
Browse files

Merge pull request #1108 from Oslandia/remove_dead_code_in_qgssingles…

…ymbolrendererv2

remove dead code in qgssinglesymbolrendererv2
  • Loading branch information
jef-n committed Jan 24, 2014
2 parents 6ca57f9 + 37efe91 commit 52229056b073475a6fed1a0000f2d65df819a790
@@ -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 5222905

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