From f4f84607a3ba6e18ad62579e72c2e33933f90862 Mon Sep 17 00:00:00 2001 From: Rudolf Weeber Date: Thu, 12 Sep 2019 15:04:33 +0200 Subject: [PATCH] Core: do_non_bonded, capture by reference rather than value --- src/core/particle_data.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/particle_data.hpp b/src/core/particle_data.hpp index 36c8e0b1885..6fb82fc0ca9 100644 --- a/src/core/particle_data.hpp +++ b/src/core/particle_data.hpp @@ -905,7 +905,7 @@ inline bool do_nonbonded(Particle const &p1, Particle const &p2) { /* check for particle 2 in particle 1's exclusion list. The exclusion list is symmetric, so this is sufficient. */ return std::none_of(p1.el.begin(), p1.el.end(), - [p2](int id) { return p2.p.identity == id; }); + [&p2](int id) { return p2.p.identity == id; }); } #endif