Commit 9134b1d3 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Use C++ strings in Configuration and C strings in output

parent 279613b2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -629,9 +629,11 @@ void ScattererConfiguration::mpibcast(const mixMPI *mpidata) {
  MPI_Bcast(&_number_of_scales, 1, MPI_INT, 0, MPI_COMM_WORLD);
  int itemp = _reference_variable_name.length()+1;
  MPI_Bcast(&itemp, 1, MPI_INT, 0, MPI_COMM_WORLD);
  char *ctemp = strdup(_reference_variable_name.c_str());
  char *ctemp = new char[itemp];
  for (int ci = 0; ci < itemp - 1; ci++) ctemp[ci] = _reference_variable_name.at(ci);
  ctemp[itemp - 1] = '\0';
  MPI_Bcast(ctemp, itemp, MPI_CHAR, 0, MPI_COMM_WORLD);
  free(ctemp);
  delete[] ctemp;
  MPI_Bcast(&_idfc, 1, MPI_INT, 0, MPI_COMM_WORLD);
  itemp = sizeof(bool);
  char *ptemp = (char *) &_use_external_sphere;
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
 */
#include <cstdio>
#include <exception>
#include <string>
// #include <string>
#include <cstring>
#include <hdf5.h>