Skip to content

Commit

Permalink
Core: do_non_bonded, capture by reference rather than value
Browse files Browse the repository at this point in the history
  • Loading branch information
RudolfWeeber committed Sep 12, 2019
1 parent 6b3c8ca commit f4f8460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/particle_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f4f8460

Please sign in to comment.