Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename enqueue_execs into enqueue_firings
[simgrid.git] / examples / cpp / activity-testany / s4u-activity-testany.cpp
index 6dc8769d2809fda204ccc5f8239d6054f34a65c3..55b273ffd6de1cf3fdb2b0cc9b663e85878c66d2 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_testany, "Messages specific for this s
 
 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;
 
@@ -54,7 +54,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[])