From fcba5ee3c9ad6f11db5ce40661c267b4337aed7e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 25 Jun 2024 15:01:17 -0400 Subject: [PATCH] silence compiler warnings and apply clang-format --- src/utils.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 4c299eec15..70dee2353e 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -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,10 +947,11 @@ 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); + int out = inumeric(file, line, typestr ? typestr : str, false, lmp); delete[] typestr; return out; }