forked from lix-project/lix
getMachines(): Cache result
This commit is contained in:
parent
2f59b30251
commit
2bc6304793
|
@ -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