From: Frederic Suter Date: Fri, 12 Apr 2019 09:08:31 +0000 (+0200) Subject: stringify X-Git-Tag: v3.22.2~146 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0adbb90374b4ca8d4f0aa463f3fa0e9a55e98f21 stringify --- diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index bbea3482b0..e729a52c7b 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -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); } diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 0ab1fa261e..e321afc296 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -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* properties = nullptr; };