use const char * for compatibility with std::string.c_str()

This commit is contained in:
Axel Kohlmeyer 2020-06-05 07:31:02 -04:00
parent 3e289bbc5e
commit 8814fc0147
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
8 changed files with 11 additions and 11 deletions

View File

@ -36,7 +36,7 @@ RestartMPIIO::RestartMPIIO(LAMMPS *lmp) : Pointers(lmp)
for some file servers it is most efficient to only read or only write
------------------------------------------------------------------------- */
void RestartMPIIO::openForRead(char *filename)
void RestartMPIIO::openForRead(const char *filename)
{
int err = MPI_File_open(world, filename, MPI_MODE_RDONLY ,
MPI_INFO_NULL, &mpifh);
@ -56,7 +56,7 @@ void RestartMPIIO::openForRead(char *filename)
for some file servers it is most efficient to only read or only write
------------------------------------------------------------------------- */
void RestartMPIIO::openForWrite(char *filename)
void RestartMPIIO::openForWrite(const char *filename)
{
int err = MPI_File_open(world, filename, MPI_MODE_WRONLY,
MPI_INFO_NULL, &mpifh);

View File

@ -28,8 +28,8 @@ class RestartMPIIO : protected Pointers {
RestartMPIIO(class LAMMPS *);
~RestartMPIIO() {}
void openForRead(char *);
void openForWrite(char *);
void openForRead(const char *);
void openForWrite(const char *);
void write(MPI_Offset, int, double *);
void read(MPI_Offset, bigint, double *);
void close();

View File

@ -2406,7 +2406,7 @@ void FixRigid::readfile(int which, double *vec,
only proc 0 writes list of global bodies to file
------------------------------------------------------------------------- */
void FixRigid::write_restart_file(char *file)
void FixRigid::write_restart_file(const char *file)
{
if (me) return;

View File

@ -36,7 +36,7 @@ class FixRigid : public Fix {
virtual void final_integrate();
void initial_integrate_respa(int, int, int);
void final_integrate_respa(int, int);
void write_restart_file(char *);
void write_restart_file(const char *);
virtual double compute_scalar();
double memory_usage();

View File

@ -2562,7 +2562,7 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody)
each proc contributes info for rigid bodies it owns
------------------------------------------------------------------------- */
void FixRigidSmall::write_restart_file(char *file)
void FixRigidSmall::write_restart_file(const char *file)
{
FILE *fp;

View File

@ -38,7 +38,7 @@ class FixRigidSmall : public Fix {
virtual void final_integrate();
void initial_integrate_respa(int, int, int);
void final_integrate_respa(int, int);
void write_restart_file(char *);
void write_restart_file(const char *);
void grow_arrays(int);
void copy_arrays(int, int, int);

View File

@ -137,7 +137,7 @@ class Fix : protected Pointers {
virtual void end_of_step() {}
virtual void post_run() {}
virtual void write_restart(FILE *) {}
virtual void write_restart_file(char *) {}
virtual void write_restart_file(const char *) {}
virtual void restart(char *) {}
virtual void grow_arrays(int) {}

View File

@ -38,8 +38,8 @@ class RestartMPIIO {
RestartMPIIO(class LAMMPS *) {mpiio_exists = 0;}
~RestartMPIIO() {}
void openForRead(char *) {}
void openForWrite(char *) {}
void openForRead(const char *) {}
void openForWrite(const char *) {}
void write(MPI_Offset,int,double *) {}
void read(MPI_Offset,long,double *) {}
void close() {}