mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +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