X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d1a82dae27086cc6f9ea4e0163d2941c74135c94..9de2143df74699fb6e21a9eb8f37e38db0c00357:/src/msg/msg_host.cpp diff --git a/src/msg/msg_host.cpp b/src/msg/msg_host.cpp index 82a9ad772f..7605967a69 100644 --- a/src/msg/msg_host.cpp +++ b/src/msg/msg_host.cpp @@ -5,16 +5,15 @@ #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" -#include "src/msg/msg_private.h" +#include "src/msg/msg_private.hpp" #include "src/simix/ActorImpl.hpp" -#include "src/simix/smx_host_private.h" - +#include "src/simix/smx_host_private.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg); simgrid::xbt::Extension simgrid::MsgHostExt::EXTENSION_ID; -SG_BEGIN_DECL() +extern "C" { int sg_storage_max_file_descriptors = 1024; @@ -166,10 +165,10 @@ xbt_dict_t MSG_host_get_properties(msg_host_t host) { xbt_assert((host != nullptr), "Invalid parameters (host is nullptr)"); xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f); - std::unordered_map* props = host->getProperties(); + std::map* props = host->getProperties(); if (props == nullptr) return nullptr; - for (auto elm : *props) { + for (auto const& elm : *props) { xbt_dict_set(as_dict, elm.first.c_str(), xbt_strdup(elm.second.c_str()), nullptr); } return as_dict; @@ -262,10 +261,9 @@ xbt_dict_t MSG_host_get_storage_content(msg_host_t host) { xbt_assert((host != nullptr), "Invalid parameters"); xbt_dict_t contents = xbt_dict_new_homogeneous(nullptr); - for (auto elm : host->getMountedStorages()) + for (auto const& elm : host->getMountedStorages()) xbt_dict_set(contents, elm.first.c_str(), MSG_storage_get_content(elm.second), nullptr); return contents; } - -SG_END_DECL() +}