From 20ea1de77d9210e145d5ebb1dccd34c856149b2c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 26 Feb 2021 12:35:29 +0100 Subject: Use std::make_unique --- src/libstore/build/derivation-goal.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 804a79e4c..33c3aeb6e 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -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(fullDrv); + drv = std::make_unique(worker.store.derivationFromPath(drvPath)); haveDerivation(); } -- cgit v1.2.3