Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add missing copyright notes
[simgrid.git] / examples / cpp / activity-waitany / s4u-activity-waitany.cpp
index aa13b415dcc254926a1b18a01d63475eaa0298b7..c19c2e6d603282f0996b4472f46fd27f6a8d55dd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -13,7 +13,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_activity_waittany, "Messages specific for this
 
 static void bob()
 {
-  sg4::Mailbox* mbox    = sg4::Mailbox::by_name(std::string("mbox"));
+  sg4::Mailbox* mbox    = sg4::Mailbox::by_name("mbox");
   const sg4::Disk* disk = sg4::Host::current()->get_disks().front();
   std::string* payload;
 
@@ -48,7 +48,7 @@ static void alice()
 {
   auto* payload = new std::string("Message");
   XBT_INFO("Send '%s'", payload->c_str());
-  sg4::Mailbox::by_name(std::string("mbox"))->put(payload, 6e8);
+  sg4::Mailbox::by_name("mbox")->put(payload, 6e8);
 }
 
 int main(int argc, char* argv[])