diff --git a/avida-core/source/actions/PopulationActions.cc b/avida-core/source/actions/PopulationActions.cc index 1b92f8dcf..c8318a210 100644 --- a/avida-core/source/actions/PopulationActions.cc +++ b/avida-core/source/actions/PopulationActions.cc @@ -5287,15 +5287,12 @@ class cActionKillDemesHighestParasiteLoad : public cAction std::cout << "warning: capped kill quota at " << kill_quota << " from " << binomial_draw << " binomial sample with " << num_eligible << " eligible and kill prob " << m_killprob << std::endl; } - const std::vector parasite_loads = [&](){ - std::vector res(num_demes); - std::transform( - std::begin(deme_indices), std::end(deme_indices), - std::begin(res), - [&pop](const int d) { return pop.GetDeme(d).GetParasiteLoad(); } - ); - return res; - }(); + std::vector parasite_loads(num_demes); + std::transform( + std::begin(deme_indices), std::end(deme_indices), + std::begin(parasite_loads), + [&pop](const int d) { return pop.GetDeme(d).GetParasiteLoad(); } + ); std::partial_sort( std::begin(deme_indices),