Skip to content

Commit 5222905

Browse files
committed
Merge pull request #1108 from Oslandia/remove_dead_code_in_qgssinglesymbolrendererv2
remove dead code in qgssinglesymbolrendererv2
2 parents 6ca57f9 + 37efe91 commit 5222905

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/core/symbology-ng/qgssinglesymbolrendererv2.cpp

-29
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,6 @@ QgsSingleSymbolRendererV2::QgsSingleSymbolRendererV2( QgsSymbolV2* symbol )
3535
Q_ASSERT( symbol );
3636
}
3737

38-
// we need to clone symbol
39-
QgsSingleSymbolRendererV2::QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & src )
40-
: QgsFeatureRendererV2( "singleSymbol" )
41-
, mSymbol( src.mSymbol.data() ? src.mSymbol->clone() : NULL )
42-
, mRotation( src.mRotation.data() ? new QgsExpression( src.mRotation->expression() ) : NULL )
43-
, mSizeScale( src.mSizeScale.data() ? new QgsExpression( src.mSizeScale->expression() ) : NULL )
44-
, mScaleMethod( src.mScaleMethod )
45-
, mTempSymbol( src.mTempSymbol.data() ? src.mTempSymbol->clone() : NULL )
46-
{
47-
}
48-
49-
// this is a copy + swap idiom implementation
50-
// the copy is done with the 'pass by value'
51-
QgsSingleSymbolRendererV2 & QgsSingleSymbolRendererV2::operator=( QgsSingleSymbolRendererV2 other )
52-
{
53-
swap( other );
54-
return *this;
55-
}
56-
57-
void QgsSingleSymbolRendererV2::swap( QgsSingleSymbolRendererV2 & other )
58-
{
59-
qSwap( mSymbol, other.mSymbol );
60-
qSwap( mRotation, other.mRotation );
61-
qSwap( mSizeScale, other.mSizeScale );
62-
qSwap( mScaleMethod, other.mScaleMethod );
63-
qSwap( mTempSymbol, other.mTempSymbol );
64-
qSwap( mOrigSize, other.mOrigSize );
65-
}
66-
6738
QgsSingleSymbolRendererV2::~QgsSingleSymbolRendererV2()
6839
{
6940
}

src/core/symbology-ng/qgssinglesymbolrendererv2.h

-6
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
2626
public:
2727

2828
QgsSingleSymbolRendererV2( QgsSymbolV2* symbol );
29-
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
30-
QgsSingleSymbolRendererV2 & operator=( QgsSingleSymbolRendererV2 other );
31-
3229

3330
virtual ~QgsSingleSymbolRendererV2();
3431

@@ -102,9 +99,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
10299
// temporary stuff for rendering
103100
QScopedPointer<QgsSymbolV2> mTempSymbol;
104101
double mOrigSize;
105-
106-
// for copy and swap idiom for assignment operator
107-
void swap( QgsSingleSymbolRendererV2 & other );
108102
};
109103

110104

0 commit comments

Comments
 (0)