Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Objectify Semaphore kernel counterpart
[simgrid.git] / src / kernel / activity / MailboxImpl.cpp
index f519fa2..b3711dd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2019. 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. */
@@ -25,7 +25,7 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 /** @brief Returns the mailbox of that name, or nullptr */
-MailboxImpl* MailboxImpl::by_name_or_null(std::string name)
+MailboxImpl* MailboxImpl::by_name_or_null(const std::string& name)
 {
   auto mbox = mailboxes->find(name);
   if (mbox != mailboxes->end())
@@ -34,7 +34,7 @@ MailboxImpl* MailboxImpl::by_name_or_null(std::string name)
     return nullptr;
 }
 /** @brief Returns the mailbox of that name, newly created on need */
-MailboxImpl* MailboxImpl::by_name_or_create(std::string name)
+MailboxImpl* MailboxImpl::by_name_or_create(const std::string& name)
 {
   /* two processes may have pushed the same mbox_create simcall at the same time */
   auto m = mailboxes->find(name);
@@ -47,7 +47,7 @@ MailboxImpl* MailboxImpl::by_name_or_create(std::string name)
     return m->second;
 }
 /** @brief set the receiver of the mailbox to allow eager sends
- *  \param actor The receiving dude
+ *  @param actor The receiving dude
  */
 void MailboxImpl::set_receiver(s4u::ActorPtr actor)
 {