Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 5222905
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
29 changes: 0 additions & 29 deletions src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
Expand Up @@ -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()
{
}
Expand Down
6 changes: 0 additions & 6 deletions src/core/symbology-ng/qgssinglesymbolrendererv2.h
Expand Up @@ -26,9 +26,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
public:

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


virtual ~QgsSingleSymbolRendererV2();

Expand Down Expand Up @@ -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 );
};


Expand Down

0 comments on commit 5222905

Please sign in to comment.