Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
check that disk has been given as argument before accessing its pimpl
[simgrid.git] / src / s4u / s4u_Engine.cpp
index 4381569..8da467d 100644 (file)
@@ -9,9 +9,6 @@
 #include <simgrid/modelchecker.h>
 #include <simgrid/s4u/Engine.hpp>
 
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333)
-#include <simgrid/simix.h>
-
 #include "mc/mc.h"
 #include "src/instr/instr_private.hpp"
 #include "src/kernel/EngineImpl.hpp"
@@ -30,8 +27,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_engine, s4u, "Logging specific to S4U (engin
 
 static simgrid::kernel::actor::ActorCode maestro_code;
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 xbt::signal<void()> Engine::on_platform_creation;
 xbt::signal<void()> Engine::on_platform_created;
 xbt::signal<void()> Engine::on_simulation_start;
@@ -339,8 +335,7 @@ void Engine::run() const
 }
 void Engine::run_until(double max_date) const
 {
-  static bool callback_called = false;
-  if (not callback_called) {
+  if (static bool callback_called = false; not callback_called) {
     on_simulation_start();
     callback_called = true;
   }
@@ -461,8 +456,7 @@ Engine* Engine::set_default_comm_data_copy_callback(
   return this;
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 void simgrid_init(int* argc, char** argv)
@@ -507,7 +501,3 @@ void simgrid_set_maestro(void (*code)(void*), void* data)
 #endif
   maestro_code = std::bind(code, data);
 }
-void SIMIX_set_maestro(void (*code)(void*), void* data) // XBT_ATTRIB_DEPRECATED_v333
-{
-  simgrid_set_maestro(code, data);
-}