use references when looping over fixes from list

This commit is contained in:
Axel Kohlmeyer
2021-10-25 21:41:57 -04:00
parent d0416757b7
commit 8bf016eaef
8 changed files with 17 additions and 17 deletions

View File

@ -105,7 +105,7 @@ void Group::assign(int narg, char **arg)
int igroup = find(arg[0]);
if (igroup == -1) error->all(FLERR,"Could not find group delete group ID");
if (igroup == 0) error->all(FLERR,"Cannot delete group all");
for (auto fix : modify->get_fix_list())
for (const auto &fix : modify->get_fix_list())
if (fix->igroup == igroup)
error->all(FLERR,"Cannot delete group currently used by a fix");
for (i = 0; i < modify->ncompute; i++)