From 6c75cf69c34af676b6b39ff69fcb439e7a4bda6e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 May 2016 16:04:52 +0200 Subject: Cleanup: Remove singleton() --- src/nix-store/nix-store.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nix-store/nix-store.cc') diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 9bb1ac50a607..0038fff036a1 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -64,7 +64,7 @@ static PathSet realisePath(Path path, bool build = true) DrvPathWithOutputs p = parseDrvPathWithOutputs(path); if (isDerivation(p.first)) { - if (build) store->buildPaths(singleton(path)); + if (build) store->buildPaths({path}); Derivation drv = store->derivationFromPath(p.first); rootNr++; @@ -101,7 +101,7 @@ static PathSet realisePath(Path path, bool build = true) if (rootNr > 1) rootName += "-" + std::to_string(rootNr); path = store->addPermRoot(path, rootName, indirectRoot); } - return singleton(path); + return {path}; } } @@ -222,7 +222,7 @@ static PathSet maybeUseOutputs(const Path & storePath, bool useOutput, bool forc outputs.insert(i.second.path); return outputs; } - else return singleton(storePath); + else return {storePath}; } @@ -537,7 +537,7 @@ static void opDumpDB(Strings opFlags, Strings opArgs) throw UsageError("no arguments expected"); PathSet validPaths = store->queryAllValidPaths(); for (auto & i : validPaths) - cout << store->makeValidityRegistration(singleton(i), true, true); + cout << store->makeValidityRegistration({i}, true, true); } -- cgit 1.4.1