Use std::make_unique

This commit is contained in:
Eelco Dolstra committed 2021-02-26 12:35:29 +01:00
1 parent 73daffb81b
commit 20ea1de77d
1 file changed
+1 -3
+1 -3
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();
}