mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
getMachines(): Cache result
This commit is contained in:
parent
2f59b30251
commit
2bc6304793
1 changed files with 5 additions and 4 deletions
|
@ -89,10 +89,11 @@ void parseMachines(const std::string & s, Machines & machines)
|
|||
|
||||
Machines getMachines()
|
||||
{
|
||||
Machines machines;
|
||||
|
||||
parseMachines(settings.builders, machines);
|
||||
|
||||
static auto machines = [&]() {
|
||||
Machines machines;
|
||||
parseMachines(settings.builders, machines);
|
||||
return machines;
|
||||
}();
|
||||
return machines;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue