Use std::unique_ptr in CoreBackend.

This commit is contained in:
Andrius Štikonas 2018-03-31 12:56:34 +01:00
parent 9218b55c57
commit 8f88efeefd
2 changed files with 4 additions and 3 deletions

View File

@ -31,13 +31,12 @@ public:
};
CoreBackend::CoreBackend() :
d(new CoreBackendPrivate())
d(std::make_unique<CoreBackendPrivate>())
{
}
CoreBackend::~CoreBackend()
{
delete d;
}
void CoreBackend::emitProgress(int i)

View File

@ -23,6 +23,8 @@
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <memory>
#include <QObject>
#include <QList>
@ -187,7 +189,7 @@ private:
QString m_id, m_version;
class CoreBackendPrivate;
CoreBackendPrivate* d;
std::unique_ptr<CoreBackendPrivate> d;
};
#endif