From: Arnaud Giersch Date: Tue, 24 Apr 2018 12:29:16 +0000 (+0200) Subject: Put deprecated annotation at declaration. X-Git-Tag: v3.20~325^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f65227b48799d7a99c119e65b0ace3e5be244285 Put deprecated annotation at declaration. --- diff --git a/include/simgrid/s4u/Storage.hpp b/include/simgrid/s4u/Storage.hpp index d8386ffcac..3204e046ad 100644 --- a/include/simgrid/s4u/Storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -20,7 +20,9 @@ extern template class XBT_PUBLIC Extendable; } namespace s4u { -XBT_PUBLIC void getStorageList(std::map* whereTo); +XBT_ATTRIB_DEPRECATED_v322( + "simgrid::s4u::getStorageList() is deprecated in favor of Engine::getAllStorages(). Please switch before v3.22") + XBT_PUBLIC void getStorageList(std::map* whereTo); class XBT_PUBLIC Storage : public simgrid::xbt::Extendable { friend s4u::Engine; diff --git a/src/s4u/s4u_Storage.cpp b/src/s4u/s4u_Storage.cpp index a4e08df8fc..8a870dfadc 100644 --- a/src/s4u/s4u_Storage.cpp +++ b/src/s4u/s4u_Storage.cpp @@ -19,9 +19,7 @@ template class Extendable; namespace s4u { -void XBT_ATTRIB_DEPRECATED_v322( - "simgrid::s4u::getStorageList() is deprecated in favor of Engine::getAllStorages(). Please switch before v3.22") - getStorageList(std::map* whereTo) +void getStorageList(std::map* whereTo) { for (auto const& s : simgrid::s4u::Engine::getInstance()->get_all_storages()) whereTo->insert({s->get_name(), s});