Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless temporary shadowing outer variable.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 31 May 2021 09:24:54 +0000 (11:24 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 31 May 2021 09:25:45 +0000 (11:25 +0200)
src/s4u/s4u_Engine.cpp

index 9898b81..e04b057 100644 (file)
@@ -254,9 +254,8 @@ Mailbox* Engine::mailbox_by_name_or_create(const std::string& name) const
   kernel::activity::MailboxImpl* mbox = kernel::actor::simcall([&name, this] {
     auto m = pimpl->mailboxes_.emplace(name, nullptr);
     if (m.second) {
-      auto* mbox = new kernel::activity::MailboxImpl(name);
-      XBT_DEBUG("Creating a mailbox at %p with name %s", mbox, name.c_str());
-      m.first->second = mbox;
+      m.first->second = new kernel::activity::MailboxImpl(name);
+      XBT_DEBUG("Creating a mailbox at %p with name %s", m.first->second, name.c_str());
     }
     return m.first->second;
   });