mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
Pass more values by reference
Rather than copying them around everywhere Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
dcabb46124
commit
c13d7d0b97
3 changed files with 6 additions and 6 deletions
|
|
@ -22,14 +22,14 @@ std::string DrvOutput::to_string() const {
|
|||
return strHash() + "!" + outputName;
|
||||
}
|
||||
|
||||
std::set<Realisation> Realisation::closure(Store & store, std::set<Realisation> startOutputs)
|
||||
std::set<Realisation> Realisation::closure(Store & store, const std::set<Realisation> & startOutputs)
|
||||
{
|
||||
std::set<Realisation> res;
|
||||
Realisation::closure(store, startOutputs, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
void Realisation::closure(Store & store, std::set<Realisation> startOutputs, std::set<Realisation> & res)
|
||||
void Realisation::closure(Store & store, const std::set<Realisation> & startOutputs, std::set<Realisation> & res)
|
||||
{
|
||||
auto getDeps = [&](const Realisation& current) -> std::set<Realisation> {
|
||||
std::set<Realisation> res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue