Use std::make_unique

This commit is contained in:
Eelco Dolstra 2021-02-26 12:35:29 +01:00
parent 73daffb81b
commit 20ea1de77d

View file

@ -259,10 +259,8 @@ void DerivationGoal::loadDerivation()
assert(worker.store.isValidPath(drvPath));
auto fullDrv = new Derivation(worker.store.derivationFromPath(drvPath));
/* Get the derivation. */
drv = std::unique_ptr<Derivation>(fullDrv);
drv = std::make_unique<Derivation>(worker.store.derivationFromPath(drvPath));
haveDerivation();
}