Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use auto return type deduction.
[simgrid.git] / src / surf / sg_platf.cpp
index e1f4d6b..f492d69 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -30,7 +30,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
 
-XBT_PRIVATE std::map<std::string, simgrid::kernel::resource::StorageImpl*> mount_list;
+XBT_PRIVATE std::map<std::string, simgrid::kernel::resource::StorageImpl*, std::less<>> mount_list;
 XBT_PRIVATE std::vector<std::string> known_storages;
 
 namespace simgrid {
@@ -42,7 +42,7 @@ xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
 } // namespace simgrid
 
 static int surf_parse_models_setup_already_called = 0;
-std::map<std::string, simgrid::kernel::resource::StorageType*> storage_types;
+std::map<std::string, simgrid::kernel::resource::StorageType*, std::less<>> storage_types;
 
 /** The current AS in the parsing */
 static simgrid::kernel::routing::NetZoneImpl* current_routing = nullptr;
@@ -122,7 +122,7 @@ static void sg_platf_new_link(const simgrid::kernel::routing::LinkCreationArgs*
     for (auto const& elm : *args->properties)
       props.insert({elm.first, elm.second});
 
-  simgrid::s4u::Link* link =
+  const simgrid::s4u::Link* link =
       routing_get_current()->create_link(link_name, args->bandwidths, args->latency, args->policy, &props);
 
   simgrid::kernel::resource::LinkImpl* l = link->get_impl();
@@ -467,7 +467,7 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor)
     XBT_DEBUG("Process %s@%s will be started at time %f", arg->name.c_str(), arg->host->get_cname(), start_time);
     simgrid::simix::Timer::set(start_time, [arg, auto_restart]() {
       simgrid::kernel::actor::ActorImplPtr new_actor = simgrid::kernel::actor::ActorImpl::create(
-          arg->name.c_str(), std::move(arg->code), arg->data, arg->host, arg->properties.get(), nullptr);
+          arg->name.c_str(), arg->code, arg->data, arg->host, arg->properties.get(), nullptr);
       if (arg->kill_time >= 0)
         new_actor->set_kill_time(arg->kill_time);
       if (auto_restart)
@@ -479,7 +479,7 @@ void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor)
 
     try {
       simgrid::kernel::actor::ActorImplPtr new_actor = nullptr;
-      new_actor = simgrid::kernel::actor::ActorImpl::create(arg->name.c_str(), std::move(code), nullptr, host,
+      new_actor = simgrid::kernel::actor::ActorImpl::create(arg->name.c_str(), code, nullptr, host,
                                                             arg->properties.get(), nullptr);
       /* The actor creation will fail if the host is currently dead, but that's fine */
       if (arg->kill_time >= 0)