replace 'strstr(xxx,"x_") == xxx' with utils::strmatch("^x_")

This commit is contained in:
Axel Kohlmeyer
2021-02-04 15:20:43 -05:00
parent 3e07711739
commit 4e791ac4f7
35 changed files with 163 additions and 163 deletions

View File

@ -361,14 +361,14 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_nbonds;
} else if (strstr(arg[iarg],"i_") == arg[iarg]) {
} else if (utils::strmatch(arg[iarg],"^i_")) {
int flag;
index[i] = atom->find_custom(&arg[iarg][2],flag);
if (index[i] < 0 || flag != 0)
error->all(FLERR,"Compute property/atom integer "
"vector does not exist");
pack_choice[i] = &ComputePropertyAtom::pack_iname;
} else if (strstr(arg[iarg],"d_") == arg[iarg]) {
} else if (utils::strmatch(arg[iarg],"^d_")) {
int flag;
index[i] = atom->find_custom(&arg[iarg][2],flag);
if (index[i] < 0 || flag != 1)