Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stop trying to build on native WIN32, it's broken anyway
[simgrid.git] / src / s4u / s4u_Engine.cpp
index b768ab4..e808263 100644 (file)
@@ -1,6 +1,6 @@
 /* s4u::Engine Simulation Engine and global functions. */
 
-/* Copyright (c) 2006-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -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"
@@ -211,7 +208,7 @@ Host* Engine::host_by_name(const std::string& name) const
 {
   auto* host = host_by_name_or_null(name);
   if (not host)
-    throw std::invalid_argument(std::string("Host not found: '") + name + std::string("'"));
+    throw std::invalid_argument("Host not found: '" + name + "'");
   return host;
 }
 
@@ -235,7 +232,7 @@ Link* Engine::link_by_name(const std::string& name) const
 {
   auto* link = link_by_name_or_null(name);
   if (not link)
-    throw std::invalid_argument(std::string("Link not found: ") + name);
+    throw std::invalid_argument("Link not found: " + name);
   return link;
 }
 
@@ -243,7 +240,7 @@ SplitDuplexLink* Engine::split_duplex_link_by_name(const std::string& name) cons
 {
   auto* link_impl = pimpl->netzone_root_ ? pimpl->netzone_root_->get_split_duplex_link_by_name_or_null(name) : nullptr;
   if (not link_impl)
-    throw std::invalid_argument(std::string("Link not found: ") + name);
+    throw std::invalid_argument("Link not found: " + name);
   return link_impl->get_iface();
 }
 
@@ -399,7 +396,7 @@ kernel::routing::NetPoint* Engine::netpoint_by_name(const std::string& name) con
 {
   auto netp = netpoint_by_name_or_null(name);
   if (netp == nullptr) {
-    throw std::invalid_argument(std::string("Netpoint not found: %s") + name);
+    throw std::invalid_argument("Netpoint not found: " + name);
   }
   return netp;
 }
@@ -498,13 +495,5 @@ double simgrid_get_clock()
 
 void simgrid_set_maestro(void (*code)(void*), void* data)
 {
-#ifdef _WIN32
-  XBT_WARN("simgrid_set_maestro is believed to not work on windows. Please help us investigating this issue if "
-           "you need that feature");
-#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);
-}