Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove unused variable
[simgrid.git] / teshsuite / s4u / actor-suspend / actor-suspend.cpp
index f7f795d4871d656f403866e77a9e28d1ddbbc8fa..91aad4daa1b7c2d22d28d66cbaa6153f9bebfa84 100644 (file)
@@ -19,7 +19,7 @@ public:
   void operator()() const
   {
     XBT_INFO("Starting.");
-    auto mailbox = simgrid::s4u::Mailbox::by_name("receiver");
+    auto* mailbox = simgrid::s4u::Mailbox::by_name("receiver");
     int data     = *mailbox->get<int>();
     XBT_INFO("Got %d at the end", data);
   }
@@ -29,7 +29,7 @@ class Suspender {
   const simgrid::s4u::ActorPtr& receiver;
 
 public:
-  Suspender(simgrid::s4u::ActorPtr& receiver) : receiver(receiver) {}
+  explicit Suspender(const simgrid::s4u::ActorPtr& receiver) : receiver(receiver) {}
 
   void operator()() const
   {
@@ -42,7 +42,7 @@ public:
     simgrid::s4u::this_actor::sleep_for(10);
 
     XBT_INFO("Sending a message to the receiver...");
-    auto mailbox = simgrid::s4u::Mailbox::by_name("receiver");
+    auto* mailbox   = simgrid::s4u::Mailbox::by_name("receiver");
     static int data = 42;
     mailbox->put(&data, 4);