mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
pal.cpp: use default implementation for constructor and destructor
It is obvious that the constructor was a no-op. Regarding the destructor, taking a mutex around an object doesn't make sense because both the mutex and the object are member variables, so if the pal object is used correctly, the destructor should only be called after any other use of the object. And explicit clearing of a unordered_map is unnecessary.
This commit is contained in:
parent
6d4c995a28
commit
c2dac183f7
@ -46,11 +46,9 @@
|
||||
|
||||
using namespace pal;
|
||||
|
||||
Pal::Pal()
|
||||
{
|
||||
// do not init and exit GEOS - we do it inside QGIS
|
||||
//initGEOS( geosNotice, geosError );
|
||||
}
|
||||
Pal::Pal() = default;
|
||||
|
||||
Pal::~Pal() = default;
|
||||
|
||||
void Pal::removeLayer( Layer *layer )
|
||||
{
|
||||
@ -70,16 +68,6 @@ void Pal::removeLayer( Layer *layer )
|
||||
mMutex.unlock();
|
||||
}
|
||||
|
||||
Pal::~Pal()
|
||||
{
|
||||
mMutex.lock();
|
||||
mLayers.clear();
|
||||
mMutex.unlock();
|
||||
|
||||
// do not init and exit GEOS - we do it inside QGIS
|
||||
//finishGEOS();
|
||||
}
|
||||
|
||||
Layer *Pal::addLayer( QgsAbstractLabelProvider *provider, const QString &layerName, QgsPalLayerSettings::Placement arrangement, double defaultPriority, bool active, bool toLabel, bool displayAll )
|
||||
{
|
||||
mMutex.lock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user