rename lambdas to avoid shadowing warnings

This commit is contained in:
Arne Morten Kvarving committed 2025-04-24 08:10:30 +02:00
1 parent e71e55064d
commit d0b23b7bd7
1 file changed
+4 -4
+4 -4
View File
@@ -155,13 +155,13 @@ public:
// That the collect function mutates the vector v is an artifact for
// testing.
auto collect = [&data, &pos](auto& v) {
auto doCollect = [&data, &pos](auto& v) {
for (auto& x : v) {
data[pos++] = x;
x = -1;
}
};
forAllGroupData(collect);
forAllGroupData(doCollect);
for (const auto& x : this->inj_vrep_rate) {
data[pos++] = x.second;
}
@@ -173,11 +173,11 @@ public:
// Distribute the summed vector to the data items.
pos = 0;
auto distribute = [&data, &pos](auto& v) {
auto doDistribute = [&data, &pos](auto& v) {
std::copy_n(data.begin() + pos, v.size(), v.begin());
pos += v.size();
};
forAllGroupData(distribute);
forAllGroupData(doDistribute);
for (auto& x : this->inj_vrep_rate) {
x.second = data[pos++];
}