aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-02-26 12:35:29 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-02-26 12:35:29 +0100
commit20ea1de77d9210e145d5ebb1dccd34c856149b2c (patch)
treeb4f1d414f37f11538744f1776590485065e1aa61 /src/libstore
parent73daffb81b77ef73e187553cc215d106795c5a0b (diff)
Use std::make_unique
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build/derivation-goal.cc4
1 files changed, 1 insertions, 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<Derivation>(fullDrv);
+ drv = std::make_unique<Derivation>(worker.store.derivationFromPath(drvPath));
haveDerivation();
}