From 0adbb90374b4ca8d4f0aa463f3fa0e9a55e98f21 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Fri, 12 Apr 2019 11:08:31 +0200 Subject: [PATCH] stringify --- src/surf/sg_platf.cpp | 2 +- src/surf/xml/platf_private.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }; -- 2.20.1