1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 17:59:36 +01:00

addToStore, addToStoreFromDump: refactor: pass refs by const reference

Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
Alexander Bantyev 2021-11-09 12:24:49 +03:00
parent 9d4dcff37a
commit 0b005bc9d6
No known key found for this signature in database
GPG key ID: E081FF12ADCB4AD5
11 changed files with 15 additions and 15 deletions

View file

@ -1180,7 +1180,7 @@ struct RestrictedStore : public virtual RestrictedStoreConfig, public virtual Lo
StorePath addToStore(const string & name, const Path & srcPath,
FileIngestionMethod method = FileIngestionMethod::Recursive, HashType hashAlgo = htSHA256,
PathFilter & filter = defaultPathFilter, RepairFlag repair = NoRepair,
StorePathSet references = StorePathSet()) override
const StorePathSet & references = StorePathSet()) override
{ throw Error("addToStore"); }
void addToStore(const ValidPathInfo & info, Source & narSource,
@ -1200,7 +1200,7 @@ struct RestrictedStore : public virtual RestrictedStoreConfig, public virtual Lo
StorePath addToStoreFromDump(Source & dump, const string & name,
FileIngestionMethod method = FileIngestionMethod::Recursive, HashType hashAlgo = htSHA256, RepairFlag repair = NoRepair,
StorePathSet references = StorePathSet()) override
const StorePathSet & references = StorePathSet()) override
{
auto path = next->addToStoreFromDump(dump, name, method, hashAlgo, repair, references);
goal.addDependency(path);