Replace strcasecmp()

This commit is contained in:
Axel Kohlmeyer
2021-10-06 20:43:56 -05:00
parent b3ca238a61
commit 5c34fe4d5d
2 changed files with 6 additions and 8 deletions

View File

@ -31,7 +31,6 @@
#include <cmath>
#include <cstring>
#include <strings.h> // for strcasecmp()
#include "omp_compat.h"
using namespace LAMMPS_NS;
@ -85,13 +84,13 @@ ComputeSAED::ComputeSAED(LAMMPS *lmp, int narg, char **arg) :
ztype[i] = SAEDmaxType + 1;
}
for (int i=0; i<ntypes; i++) {
for (int j = 0; j < SAEDmaxType; j++) {
if (strcasecmp(arg[iarg],SAEDtypeList[j]) == 0) {
for (int j = 0; j < SAEDmaxType; j++) {
if (utils::lowercase(arg[iarg]) == utils::lowercase(SAEDtypeList[j])) {
ztype[i] = j;
}
}
if (ztype[i] == SAEDmaxType + 1)
error->all(FLERR,"Compute SAED: Invalid ASF atom type");
}
if (ztype[i] == SAEDmaxType + 1)
error->all(FLERR,"Compute SAED: Invalid ASF atom type");
iarg++;
}

View File

@ -32,7 +32,6 @@
#include <cmath>
#include <cstring>
#include <strings.h> // for strcasecmp()
#include "omp_compat.h"
using namespace LAMMPS_NS;
@ -87,7 +86,7 @@ ComputeXRD::ComputeXRD(LAMMPS *lmp, int narg, char **arg) :
}
for (int i = 0; i < ntypes; i++) {
for (int j = 0; j < XRDmaxType; j++) {
if (strcasecmp(arg[iarg],XRDtypeList[j]) == 0) {
if (utils::lowercase(arg[iarg]) == utils::lowercase(XRDtypeList[j])) {
ztype[i] = j;
}
}