Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Whenever possible, use std::move() for parameters (mostly std::string).
[simgrid.git] / teshsuite / s4u / cloud-sharing / cloud-sharing.cpp
index 1cbb06b..4121731 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
+/* Copyright (c) 2007-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,6 +7,7 @@
 #include "simgrid/s4u.hpp"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/s4u/VirtualMachine.hpp"
+#include <cmath>
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this msg example");
 
@@ -41,7 +42,7 @@ static int computation_fun(std::vector<std::string> argv)
 static void run_test_process(std::string name, simgrid::s4u::Host *location, int size)
 {
   std::vector<std::string> arg = {std::to_string(size)};
-  simgrid::s4u::Actor::create(name, location, computation_fun, arg);
+  simgrid::s4u::Actor::create(std::move(name), location, computation_fun, arg);
 }
 
 static void test_energy_consumption(std::string name, int nb_cores)