diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-04 16:04:52 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-04 16:16:53 +0200 |
commit | 6c75cf69c34af676b6b39ff69fcb439e7a4bda6e (patch) | |
tree | c66abd02ca1a5b5b9dedcc8d2477696f7414af23 /src/libstore | |
parent | 0d4a10e910e1916a6f36cb9af6b68817172b51a9 (diff) |
Cleanup: Remove singleton()
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 7 | ||||
-rw-r--r-- | src/libstore/local-store.cc | 4 | ||||
-rw-r--r-- | src/libstore/profiles.cc | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index e6ec7886f..81c79435e 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2145,8 +2145,7 @@ void DerivationGoal::startBuilder() /* parent */ pid.setSeparatePG(true); builderOut.writeSide.close(); - worker.childStarted(shared_from_this(), - singleton<set<int> >(builderOut.readSide), true, true); + worker.childStarted(shared_from_this(), {builderOut.readSide}, true, true); /* Check if setting up the build environment failed. */ while (true) { @@ -3698,7 +3697,7 @@ void LocalStore::ensurePath(const Path & path) Worker worker(*this); GoalPtr goal = worker.makeSubstitutionGoal(path); - Goals goals = singleton<Goals>(goal); + Goals goals = {goal}; worker.run(goals); @@ -3711,7 +3710,7 @@ void LocalStore::repairPath(const Path & path) { Worker worker(*this); GoalPtr goal = worker.makeSubstitutionGoal(path, true); - Goals goals = singleton<Goals>(goal); + Goals goals = {goal}; worker.run(goals); diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index ff434d058..6f33c1e81 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -949,7 +949,7 @@ Path LocalStore::addToStoreFromDump(const string & dump, const string & name, /* The first check above is an optimisation to prevent unnecessary lock acquisition. */ - PathLocks outputLock(singleton<PathSet, Path>(dstPath)); + PathLocks outputLock({dstPath}); if (repair || !isValidPath(dstPath)) { @@ -1018,7 +1018,7 @@ Path LocalStore::addTextToStore(const string & name, const string & s, if (repair || !isValidPath(dstPath)) { - PathLocks outputLock(singleton<PathSet, Path>(dstPath)); + PathLocks outputLock({dstPath}); if (repair || !isValidPath(dstPath)) { diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index cc83a838e..18e3bcbec 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -222,8 +222,7 @@ void switchLink(Path link, Path target) void lockProfile(PathLocks & lock, const Path & profile) { - lock.lockPaths(singleton<PathSet>(profile), - (format("waiting for lock on profile ‘%1%’") % profile).str()); + lock.lockPaths({profile}, (format("waiting for lock on profile ‘%1%’") % profile).str()); lock.setDeletion(true); } |