From 75e4262bd90620f114bdf576fdc3a63ef9dfb27e Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 24 Apr 2018 14:34:11 +0200 Subject: [PATCH 1/1] Use initialization list. --- examples/s4u/actor-create/s4u-actor-create.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/s4u/actor-create/s4u-actor-create.cpp b/examples/s4u/actor-create/s4u-actor-create.cpp index 8a51c0ef32..6f18c3ad4a 100644 --- a/examples/s4u/actor-create/s4u-actor-create.cpp +++ b/examples/s4u/actor-create/s4u-actor-create.cpp @@ -65,7 +65,7 @@ public: std::string mbox = "mb42"; std::string msg = "GaBuZoMeu"; explicit Sender() = default; /* Sending the default message */ - explicit Sender(std::string arg) { /* Sending the specified message */ msg= arg; } + explicit Sender(std::string arg) : msg(arg) { /* Sending the specified message */} explicit Sender(std::vector args) { /* This constructor is used when we start the actor from the deployment file */ -- 2.20.1