Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please vera++: don't pass vectors by copy
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 13 Jun 2017 19:58:34 +0000 (21:58 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 13 Jun 2017 20:17:16 +0000 (22:17 +0200)
include/simgrid/s4u/Actor.hpp

index d1121ea..6aff62b 100644 (file)
@@ -175,10 +175,10 @@ public:
    */
   static ActorPtr createActor(const char* name, s4u::Host* host, std::function<void()> code);
 
-  static ActorPtr createActor(const char* name, s4u::Host* host, std::function<void(std::vector<std::string>)> code,
-                              std::vector<std::string> args)
+  static ActorPtr createActor(const char* name, s4u::Host* host, std::function<void(std::vector<std::string>*)> code,
+                              std::vector<std::string>* args)
   {
-    return createActor(name, host, [code](std::vector<std::string> args) { code(args); }, args);
+    return createActor(name, host, [code](std::vector<std::string>* args) { code(args); }, args);
   }
 
   /** Create an actor using code