Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove explicit conversion to std::string when it's not required.
[simgrid.git] / examples / cpp / network-nonlinear / s4u-network-nonlinear.cpp
index 292503e..b065a79 100644 (file)
@@ -32,7 +32,7 @@ public:
 
     /* Start dispatching all messages to receiver */
     for (int i = 0; i < messages_count; i++) {
-      std::string msg_content = std::string("Message ") + std::to_string(i);
+      std::string msg_content = "Message " + std::to_string(i);
       // Copy the data we send: the 'msg_content' variable is not a stable storage location.
       // It will be destroyed when this actor leaves the loop, ie before the receiver gets it
       auto* payload           = new std::string(msg_content);