Outline lambdas

This commit is contained in:
Alessandro Di Federico
2018-04-23 08:45:05 +02:00
parent 31e5d1c96f
commit a566130825
3 changed files with 22 additions and 20 deletions
+5 -4
View File
@@ -215,12 +215,13 @@ VariableManager::VariableManager(Module& TheModule,
assert(EnvElection.size() > 0);
auto Compare = [] (ElectionMapElement& It1,
ElectionMapElement& It2) {
return It1.second < It2.second;
};
CPUStateType = std::max_element(EnvElection.begin(),
EnvElection.end(),
[] (ElectionMapElement& It1,
ElectionMapElement& It2) {
return It1.second < It2.second;
})->first;
Compare)->first;
// Look for structures containing CPUStateType as a member and promove them
// to CPUStateType. Basically this is a flexible way to keep track of the *CPU