Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use C++ strings instead of char*.
[simgrid.git] / src / surf / network_ns3.cpp
index dd0e1c9..fe0fdee 100644 (file)
@@ -166,7 +166,7 @@ NetworkNS3Model::~NetworkNS3Model() {
   xbt_dict_free(&flowFromSock);
 }
 
-LinkImpl* NetworkNS3Model::createLink(const char* name, double bandwidth, double latency,
+LinkImpl* NetworkNS3Model::createLink(const std::string& name, double bandwidth, double latency,
                                       e_surf_link_sharing_policy_t policy)
 {
   return new LinkNS3(this, name, bandwidth, latency);
@@ -257,7 +257,7 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
  * Resource *
  ************/
 
-LinkNS3::LinkNS3(NetworkNS3Model* model, const char* name, double bandwidth, double latency)
+LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwidth, double latency)
     : LinkImpl(model, name, nullptr)
 {
   bandwidth_.peak = bandwidth;