Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace redundant type with "auto" (src/smpi/).
[simgrid.git] / src / s4u / s4u_Host.cpp
index b9b273ca6fc521b3ea210d2cca14d19d21bf5892..3dba929a30d991df2c98fb75b758a38825ce72c2 100644 (file)
@@ -294,17 +294,17 @@ std::unordered_map<std::string, Storage*> const& Host::get_mounted_storages()
   return *mounts_;
 }
 
-ExecPtr Host::exec_async(double flops)
+ExecPtr Host::exec_async(double flops) const
 {
   return this_actor::exec_init(flops);
 }
 
-void Host::execute(double flops)
+void Host::execute(double flops) const
 {
   execute(flops, 1.0 /* priority */);
 }
 
-void Host::execute(double flops, double priority)
+void Host::execute(double flops, double priority) const
 {
   this_actor::exec_init(flops)->set_priority(1 / priority)->start()->wait();
 }
@@ -319,7 +319,7 @@ size_t sg_host_count()
 }
 sg_host_t* sg_host_list()
 {
-  simgrid::s4u::Engine* e = simgrid::s4u::Engine::get_instance();
+  const simgrid::s4u::Engine* e = simgrid::s4u::Engine::get_instance();
   size_t host_count       = e->get_host_count();
   xbt_assert(host_count > 0, "There is no host!");
   std::vector<simgrid::s4u::Host*> hosts = e->get_all_hosts();
@@ -350,7 +350,7 @@ sg_host_t sg_host_by_name(const char* name)
   return simgrid::s4u::Host::by_name_or_null(name);
 }
 
-xbt_dynar_t sg_hosts_as_dynar()
+xbt_dynar_t sg_hosts_as_dynar() // XBT_ATTRIB_DEPRECATED_v330
 {
   std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();