implement clang-tidy fixes

This commit is contained in:
Axel Kohlmeyer
2024-02-09 06:22:10 -05:00
parent 9c6e88f575
commit f8885cb266
3 changed files with 4 additions and 4 deletions

View File

@ -843,7 +843,7 @@ void PairAmoeba::init_style()
} else {
index[i] = atom->find_custom(names[i], flag, cols);
}
std::string err = "";
std::string err;
if (index[i] < 0) err = "was not defined";
else if (flag_check[i] != flag) err = "has the wrong type";
else if (cols_check[i] != cols) err = "has the wrong number of columns";

View File

@ -150,7 +150,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
if (has_git_info() && ((update_string == " - Development") || (update_string == " - Maintenance")))
update_string += fmt::format(" - {}", git_descriptor());
external_comm = 0;
external_comm = MPI_COMM_NULL;
mdicomm = nullptr;
skiprunflag = 0;
@ -807,7 +807,7 @@ LAMMPS::~LAMMPS() noexcept(false)
// free a copy of uorig here, so check in universe destructor will still work
MPI_Comm copy = universe->uorig;
if (external_comm) MPI_Comm_free(&copy);
if (external_comm != MPI_COMM_NULL) MPI_Comm_free(&copy);
delete input;
delete universe;

View File

@ -147,7 +147,7 @@ protected:
fclose(fp);
command(fmt::format("molecule {} {} {}", name, file, args));
platform::unlink(file.c_str());
platform::unlink(file);
}
};