1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 02:01:48 +02: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

@ -453,7 +453,7 @@ public:
libutil/archive.hh). */
virtual StorePath addToStore(const string & name, const Path & srcPath,
FileIngestionMethod method = FileIngestionMethod::Recursive, HashType hashAlgo = htSHA256,
PathFilter & filter = defaultPathFilter, RepairFlag repair = NoRepair, StorePathSet references = StorePathSet());
PathFilter & filter = defaultPathFilter, RepairFlag repair = NoRepair, const StorePathSet & references = StorePathSet());
/* Copy the contents of a path to the store and register the
validity the resulting path, using a constant amount of
@ -470,7 +470,7 @@ public:
// FIXME: remove?
virtual StorePath addToStoreFromDump(Source & dump, const string & name,
FileIngestionMethod method = FileIngestionMethod::Recursive, HashType hashAlgo = htSHA256, RepairFlag repair = NoRepair,
StorePathSet references = StorePathSet())
const StorePathSet & references = StorePathSet())
{ unsupported("addToStoreFromDump"); }
/* Like addToStore, but the contents written to the output path is