implement clang-tidy fixes
This commit is contained in:
@ -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";
|
||||
|
||||
@ -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(©);
|
||||
if (external_comm != MPI_COMM_NULL) MPI_Comm_free(©);
|
||||
|
||||
delete input;
|
||||
delete universe;
|
||||
|
||||
@ -147,7 +147,7 @@ protected:
|
||||
fclose(fp);
|
||||
|
||||
command(fmt::format("molecule {} {} {}", name, file, args));
|
||||
platform::unlink(file.c_str());
|
||||
platform::unlink(file);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user