Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
pass large objects by const ref to please sonar
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 4 Mar 2020 11:09:49 +0000 (12:09 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 4 Mar 2020 11:09:49 +0000 (12:09 +0100)
include/simgrid/s4u/Engine.hpp
src/s4u/s4u_Engine.cpp

index b1405ca..b4259fd 100644 (file)
@@ -165,7 +165,7 @@ public:
   void set_config(const std::string& name, int value);
   void set_config(const std::string& name, bool value);
   void set_config(const std::string& name, double value);
-  void set_config(const std::string& name, std::string value);
+  void set_config(const std::string& name, const std::string& value);
 
   /** Callback fired when the platform is created (ie, the xml file parsed),
    * right before the actual simulation starts. */
index 2c486a0..f21bdbf 100644 (file)
@@ -421,7 +421,7 @@ void Engine::set_config(const std::string& name, bool value)
 {
   config::set_value(name.c_str(), value);
 }
-void Engine::set_config(const std::string& name, std::string value)
+void Engine::set_config(const std::string& name, const std::string& value)
 {
   config::set_value(name.c_str(), value);
 }