capture by reference
This commit is contained in:
@ -565,7 +565,7 @@ void Atom::add_peratom(const std::string &name, void *address,
|
||||
void Atom::add_peratom_change_columns(const std::string &name, int cols)
|
||||
{
|
||||
auto match = std::find_if(peratom.begin(), peratom.end(),
|
||||
[name] (const PerAtom &p) { return p.name == name; });
|
||||
[&name] (const PerAtom &p) { return p.name == name; });
|
||||
|
||||
if (match != peratom.end()) (*match).cols = cols;
|
||||
else error->all(FLERR,"Could not find per-atom array name {} for column change", name);
|
||||
|
||||
Reference in New Issue
Block a user