silence compiler warnings and apply clang-format

This commit is contained in:
Axel Kohlmeyer
2024-06-25 15:01:17 -04:00
parent 3453f13c2d
commit fcba5ee3c9

View File

@ -648,6 +648,7 @@ template void utils::bounds<>(const char *, int, const std::string &,
template void utils::bounds<>(const char *, int, const std::string &,
bigint, bigint, long long &, long long &, Error *);
// clang-format on
/* ----------------------------------------------------------------------
wrapper for bounds() that accepts type label input
------------------------------------------------------------------------- */
@ -658,20 +659,21 @@ void utils::bounds_typelabel(const char *file, int line, const std::string &str,
{
nlo = nhi = -1;
char *typestr;
if ( typestr = utils::expand_type(FLERR, str, mode, lmp) )
if ((typestr = utils::expand_type(FLERR, str, mode, lmp)))
nlo = nhi = utils::inumeric(FLERR, typestr, false, lmp);
delete[] typestr;
if (nlo > -1) return;
else utils::bounds(file, line, str, nmin, nmax, nlo, nhi, error);
if (nlo > -1)
return;
else
utils::bounds(file, line, str, nmin, nmax, nlo, nhi, error);
}
template void utils::bounds_typelabel<>(const char *, int, const std::string &,
bigint, bigint, int &, int &, Error *, LAMMPS *, int);
template void utils::bounds_typelabel<>(const char *, int, const std::string &,
bigint, bigint, long &, long &, Error *, LAMMPS *, int);
template void utils::bounds_typelabel<>(const char *, int, const std::string &,
bigint, bigint, long long &, long long &, Error *, LAMMPS *, int);
// clang-format on
template void utils::bounds_typelabel<>(const char *, int, const std::string &, bigint, bigint,
int &, int &, Error *, LAMMPS *, int);
template void utils::bounds_typelabel<>(const char *, int, const std::string &, bigint, bigint,
long &, long &, Error *, LAMMPS *, int);
template void utils::bounds_typelabel<>(const char *, int, const std::string &, bigint, bigint,
long long &, long long &, Error *, LAMMPS *, int);
/* -------------------------------------------------------------------------
Expand list of arguments in arg to earg if arg contains wildcards
@ -945,7 +947,8 @@ char *utils::expand_type(const char *file, int line, const std::string &str, int
For example, type <= 0 or type > Ntypes is checked in calling routine.
------------------------------------------------------------------------- */
int utils::expand_type_int(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp)
int utils::expand_type_int(const char *file, int line, const std::string &str, int mode,
LAMMPS *lmp)
{
char *typestr = expand_type(file, line, str, mode, lmp);
int out = inumeric(file, line, typestr ? typestr : str, false, lmp);