replace a few more cases of atoi()/atof() with utils::*numeric() functions

This commit is contained in:
Axel Kohlmeyer
2021-02-21 15:09:50 -05:00
parent d5917652d4
commit 826c618aa9
4 changed files with 22 additions and 16 deletions

View File

@ -1752,7 +1752,7 @@ void Atom::set_mass(const char *file, int line, int /*narg*/, char **arg)
if (lo < 1 || hi > ntypes) error->all(file,line,"Invalid type for mass set");
for (int itype = lo; itype <= hi; itype++) {
mass[itype] = atof(arg[1]);
mass[itype] = utils::numeric(FLERR,arg[1],false,lmp);
mass_setflag[itype] = 1;
if (mass[itype] <= 0.0) error->all(file,line,"Invalid mass value");