Use varargs version of Error:all() and Error::one() where applicable

This commit is contained in:
Axel Kohlmeyer
2021-04-25 21:30:51 -04:00
parent 4cbe6200d6
commit e9e0bb71b6
117 changed files with 522 additions and 524 deletions

View File

@ -2481,20 +2481,20 @@ int AtomVec::process_fields(char *str, const char *default_str, Method *method)
for (match = 0; match < nperatom; match++)
if (field == peratom[match].name) break;
if (match == nperatom)
error->all(FLERR,fmt::format("Peratom field {} not recognized", field));
error->all(FLERR,"Peratom field {} not recognized", field);
index[i] = match;
// error if field appears multiple times
for (match = 0; match < i; match++)
if (index[i] == index[match])
error->all(FLERR,fmt::format("Peratom field {} is repeated", field));
error->all(FLERR,"Peratom field {} is repeated", field);
// error if field is in default str
for (match = 0; match < ndef; match++)
if (field == def_words[match])
error->all(FLERR,fmt::format("Peratom field {} is a default", field));
error->all(FLERR,"Peratom field {} is a default", field);
}
return nfield;