Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stringify
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 12 Apr 2019 09:08:31 +0000 (11:08 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 12 Apr 2019 09:08:31 +0000 (11:08 +0200)
src/surf/sg_platf.cpp
src/surf/xml/platf_private.hpp

index bbea348..e729a52 100644 (file)
@@ -86,7 +86,7 @@ void sg_platf_new_host(simgrid::kernel::routing::HostCreationArgs* args)
     host->pimpl_cpu->set_speed_profile(args->speed_trace);
   if (args->pstate != 0)
     host->pimpl_cpu->set_pstate(args->pstate);
-  if (args->coord && strcmp(args->coord, ""))
+  if (not args->coord.empty())
     new simgrid::kernel::routing::vivaldi::Coords(host->pimpl_netpoint, args->coord);
 }
 
index 0ab1fa2..e321afc 100644 (file)
@@ -39,7 +39,7 @@ struct HostCreationArgs {
   int core_amount          = 0;
   profile::Profile* speed_trace                            = nullptr;
   profile::Profile* state_trace                            = nullptr;
-  const char* coord        = nullptr;
+  std::string coord                                        = "";
   std::unordered_map<std::string, std::string>* properties = nullptr;
 };