Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: .name().c_str() becomes .cname()
[simgrid.git] / src / simgrid / host.cpp
index 77e84c3..0da2044 100644 (file)
 #include <xbt/Extendable.hpp>
 #include <simgrid/s4u/host.hpp>
 
+#include "src/kernel/routing/NetCard.hpp"
 #include "src/surf/HostImpl.hpp"
-#include "surf/surf.h" // routing_get_network_element_type FIXME:killme
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
 
 extern std::unordered_map<std::string, simgrid::s4u::Host*>
-    host_list; // FIXME: don't dupplicate the content of s4u::Host this way
+    host_list; // FIXME: don't duplicate the content of s4u::Host this way
 
 void sg_host_exit()
 {
@@ -81,8 +81,8 @@ sg_host_t sg_host_by_name(const char *name)
 
 static int hostcmp_voidp(const void* pa, const void* pb)
 {
-  return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->name().c_str(),
-                (*static_cast<simgrid::s4u::Host* const*>(pb))->name().c_str());
+  return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->cname(),
+                (*static_cast<simgrid::s4u::Host* const*>(pb))->cname());
 }
 
 xbt_dynar_t sg_hosts_as_dynar()