replace a few more cases of atoi()/atof() with utils::*numeric() functions
This commit is contained in:
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user