Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Now returns true if the file could be opened
authorYann Duplouy <yann.duplouy@inria.fr>
Mon, 27 Apr 2020 08:01:40 +0000 (10:01 +0200)
committerYann Duplouy <yann.duplouy@inria.fr>
Mon, 27 Apr 2020 08:01:40 +0000 (10:01 +0200)
src/xbt/random.cpp

index 004418e..539340b 100644 (file)
@@ -36,7 +36,7 @@ bool Random::write_state(std::string filename)
   std::ofstream file(filename);
   if (file) {
     file << mt19937_gen;
   std::ofstream file(filename);
   if (file) {
     file << mt19937_gen;
-    return false;
+    return true;
   } else {
     XBT_WARN("Could not open %s and thus not read the RNG state.", filename.c_str());
     return false;
   } else {
     XBT_WARN("Could not open %s and thus not read the RNG state.", filename.c_str());
     return false;