Commit d6fbbb96 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

USe std::unique_ptr here

parent cf2f6470
Pipeline #87863 passed with stage
in 7 minutes and 44 seconds
......@@ -41,10 +41,7 @@ KeyFilter::FontDescription::FontDescription(const FontDescription &other)
}
KeyFilter::FontDescription::~FontDescription()
{
delete d;
}
KeyFilter::FontDescription::~FontDescription() = default;
KeyFilter::FontDescription KeyFilter::FontDescription::create(bool b, bool i, bool s)
{
......
......@@ -14,7 +14,7 @@
#include <algorithm>
#include <kleo_export.h>
#include <memory>
namespace GpgME
{
class Key;
......@@ -84,7 +84,7 @@ public:
}
struct Private;
private:
Private *d;
std::unique_ptr<Private> d;
};
virtual FontDescription fontDescription() const = 0;
......
......@@ -198,7 +198,6 @@ KeyFilterManager::~KeyFilterManager()
if (d) {
d->clear();
}
delete d; d = nullptr;
}
KeyFilterManager *KeyFilterManager::instance()
......
......@@ -65,7 +65,7 @@ public:
class Private;
private:
Private *d;
std::unique_ptr<Private> d;
static KeyFilterManager *mSelf;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment