From c70b4a5c168649441b028b62bfd8e0fa49f5818a Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 31 Mar 2018 19:23:38 +0200 Subject: [PATCH] deprecate a function to snake_case it --- include/simgrid/s4u/Host.hpp | 4 ++-- src/simgrid/host.cpp | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index c67ead8fd1..a87405b258 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -96,8 +96,8 @@ public: void setPstate(int pstate_index); int getPstate(); std::vector get_attached_storages(); - // XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_attached_storages() instead.") - void getAttachedStorages(std::vector * storages); + XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_attached_storages() instead.") void getAttachedStorages( + std::vector* storages); /** Get an associative list [mount point]->[Storage] of all local mount points. * diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 32f2e5d1cf..e47f72a728 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -110,12 +110,10 @@ xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){ } xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host){ - std::vector* storage_vector = new std::vector(); xbt_dynar_t storage_dynar = xbt_dynar_new(sizeof(const char*), nullptr); - host->getAttachedStorages(storage_vector); - for (auto const& name : *storage_vector) + std::vector storage_vector = host->get_attached_storages(); + for (auto const& name : storage_vector) xbt_dynar_push(storage_dynar, &name); - delete storage_vector; return storage_dynar; } -- 2.20.1