Unverified Commit 8814fc01 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

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

parent 3e289bbc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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;

Loading