From: Arnaud Giersch Date: Tue, 24 Apr 2018 12:34:11 +0000 (+0200) Subject: Use initialization list. X-Git-Tag: v3.20~325^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/75e4262bd90620f114bdf576fdc3a63ef9dfb27e?hp=f65227b48799d7a99c119e65b0ace3e5be244285 Use initialization list. --- 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 */