Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Datatype: Make encode() a static member
[simgrid.git] / src / mc / Session.cpp
index b88f98d..97834f1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team.
+/* Copyright (c) 2015-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -13,7 +13,7 @@
 #include "xbt/system_error.hpp"
 #include <mc/mc.h>
 #include <simgrid/modelchecker.h>
-#include <simgrid/sg_config.h>
+#include <simgrid/sg_config.hpp>
 
 #include "src/mc/Session.hpp"
 #include "src/mc/checker/Checker.hpp"
@@ -23,6 +23,7 @@
 #include "src/smpi/include/private.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Session, mc, "Model-checker session");
+extern std::string _sg_mc_dot_output_file;
 
 namespace simgrid {
 namespace mc {
@@ -122,7 +123,7 @@ void Session::logState()
 {
   mc_model_checker->getChecker()->logState();
 
-  if ((_sg_mc_dot_output_file != nullptr) && (_sg_mc_dot_output_file[0] != '\0')) {
+  if (not _sg_mc_dot_output_file.empty()) {
     fprintf(dot_output, "}\n");
     fclose(dot_output);
   }