remove .c_str() in several places because it is no longer neede

This commit is contained in:
Axel Kohlmeyer
2020-06-05 12:11:54 -04:00
parent c7ef89dc4a
commit 04d7eacc2f
5 changed files with 17 additions and 19 deletions

View File

@ -123,7 +123,7 @@ void WriteData::command(int narg, char **arg)
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
}
write(file.c_str());
write(file);
}
/* ----------------------------------------------------------------------
@ -131,7 +131,7 @@ void WriteData::command(int narg, char **arg)
might later let it be directly called within run/minimize loop
------------------------------------------------------------------------- */
void WriteData::write(const char *file)
void WriteData::write(const std::string &file)
{
// special case where reneighboring is not done in integrator
// on timestep data file is written (due to build_once being set)
@ -187,7 +187,7 @@ void WriteData::write(const char *file)
// open data file
if (me == 0) {
fp = fopen(file,"w");
fp = fopen(file.c_str(),"w");
if (fp == NULL)
error->one(FLERR,fmt::format("Cannot open data file {}: {}",
file, utils::getsyserror()));