Skip to content

Commit 48789ef

Browse files
committed
Simplify captures for early cxx compat
1 parent b052637 commit 48789ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

avida-core/source/actions/PopulationActions.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5291,7 +5291,7 @@ class cActionKillDemesHighestParasiteLoad : public cAction
52915291

52925292
const int num_eligible = std::count_if(
52935293
std::begin(deme_indices), std::end(deme_indices),
5294-
[&pop](const int d) { return not pop.GetDeme(d).IsEmpty(); }
5294+
[&](const int d) { return not pop.GetDeme(d).IsEmpty(); }
52955295
);
52965296
const int binomial_draw = ctx.GetRandom().GetRandBinomial(
52975297
num_eligible,
@@ -5306,22 +5306,22 @@ class cActionKillDemesHighestParasiteLoad : public cAction
53065306
std::transform(
53075307
std::begin(deme_indices), std::end(deme_indices),
53085308
std::begin(parasite_loads),
5309-
[&pop](const int d) { return pop.GetDeme(d).GetParasiteLoad(); }
5309+
[&](const int d) { return pop.GetDeme(d).GetParasiteLoad(); }
53105310
);
53115311

53125312
std::partial_sort(
53135313
std::begin(deme_indices),
53145314
std::next(std::begin(deme_indices), kill_quota),
53155315
std::end(deme_indices),
5316-
[&parasite_loads](const int d1, const int d2) {
5316+
[&](const int d1, const int d2) {
53175317
return parasite_loads[d1] > parasite_loads[d2];
53185318
}
53195319
);
53205320

53215321
std::for_each(
53225322
std::begin(deme_indices),
53235323
std::next(std::begin(deme_indices), kill_quota),
5324-
[&pop, &ctx](const int d) { pop.GetDeme(d).KillAll(ctx); }
5324+
[&](const int d) { pop.GetDeme(d).KillAll(ctx); }
53255325
);
53265326

53275327
} // End Process()

0 commit comments

Comments
 (0)