]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/sosp/Snapshot_test.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
const again
[simgrid.git] / src / mc / sosp / Snapshot_test.cpp
index 79b9485b8cc9836c60d5a07c89b605edaff5d32a..633c89af78ab56e50bb90df6a59a3f2d6b111e0f 100644 (file)
@@ -8,6 +8,7 @@
 #include "src/mc/sosp/Snapshot.hpp"
 
 #include <cstddef>
+#include <memory>
 #include <sys/mman.h>
 #include <xbt/random.hpp>
 
@@ -17,13 +18,13 @@ class snap_test_helper {
 public:
   static void init_memory(void* mem, size_t size);
   static void Init();
-  typedef struct {
+  struct prologue_return {
     size_t size;
     void* src;
     void* dstn;
     Region* region0;
     Region* region;
-  } prologue_return;
+  };
   static prologue_return prologue(int n); // common to the below 5 fxs
   static void read_whole_region();
   static void read_region_parts();
@@ -56,7 +57,7 @@ void snap_test_helper::Init()
   REQUIRE(xbt_pagesize == getpagesize());
   REQUIRE(1 << xbt_pagebits == xbt_pagesize);
 
-  process.reset(new simgrid::mc::RemoteSimulation(getpid()));
+  process = std::make_unique<simgrid::mc::RemoteSimulation>(getpid());
   process->init();
   mc_model_checker = new ::simgrid::mc::ModelChecker(std::move(process), -1);
 }