Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 15 Mar 2017 23:09:14 +0000 (00:09 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 15 Mar 2017 23:09:14 +0000 (00:09 +0100)
examples/s4u/actions-comm/s4u_actions-comm.cpp

index 28d94f2..e669955 100644 (file)
@@ -31,17 +31,20 @@ public:
   {
     int argc;
     char* argv[2];
-    argv[0] = (char*)(args.at(0).c_str());
+    argv[0] = &args.at(0)[0];
     if (args.size() == 1) {
       argc = 1;
     } else {
       argc    = 2;
-      argv[1] = (char*)(args.at(1).c_str());
+      argv[1] = &args.at(1)[0];
     }
     xbt_replay_action_runner(argc, argv);
   }
 
-  void operator()() {}
+  void operator()()
+  {
+    // Nothing to do here
+  }
 
   /* My actions */
   static void compute(const char* const* action)