Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove explicit conversion to std::string when it's not required.
[simgrid.git] / src / s4u / s4u_Engine.cpp
index b768ab4..5e5b04a 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"
@@ -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;
 }
@@ -504,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);
-}