mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
daemon: Remove ‘singleton’ and replace ‘typedef’ with ‘using’ in ‘types.hh’
* nix/libutil/util.hh (singleton): Remove. * nix/libstore/build.cc (DerivationGoal::startBuilder) (SubstitutionGoal::tryNext, SubstitutionGoal::tryToRun) (LocalStore::ensurePath, LocalStore::repairPath): Use normal construction function instead of ‘singleton’. * nix/libstore/local-store.cc (LocalStore::addToStoreFromDump) (LocalStore::addTextToStore, LocalStore::importPath): Likewise. * nix/nix-daemon/nix-daemon.cc (performOp): Likewise. Change-Id: If0d929407c09482f3b506a1c51dfda70e29696dd Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
8a6cf4fad6
commit
4b9d14378f
5 changed files with 17 additions and 27 deletions
|
@ -336,7 +336,7 @@ static void performOp(bool trusted, unsigned int clientVersion,
|
|||
case wopHasSubstitutes: {
|
||||
Path path = readStorePath(from);
|
||||
startWork();
|
||||
PathSet res = store->querySubstitutablePaths(singleton<PathSet>(path));
|
||||
PathSet res = store->querySubstitutablePaths(PathSet{path});
|
||||
stopWork();
|
||||
writeInt(res.find(path) != res.end(), to);
|
||||
break;
|
||||
|
@ -656,7 +656,7 @@ static void performOp(bool trusted, unsigned int clientVersion,
|
|||
Path path = absPath(readString(from));
|
||||
startWork();
|
||||
SubstitutablePathInfos infos;
|
||||
store->querySubstitutablePathInfos(singleton<PathSet>(path), infos);
|
||||
store->querySubstitutablePathInfos(PathSet{path}, infos);
|
||||
stopWork();
|
||||
SubstitutablePathInfos::iterator i = infos.find(path);
|
||||
if (i == infos.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue