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 / comm-wait / s4u-comm-wait.cpp
index 74edc64..6ec1b67 100644 (file)
@@ -30,7 +30,7 @@ static void sender(int messages_count, size_t payload_size)
   sg4::this_actor::sleep_for(sleep_start_time);
 
   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 the data
     auto* payload = new std::string(msg_content);