Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove dead code in qgssinglesymbolrendererv2 #1108

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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