A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move ugly dict closer to the C APIs
[simgrid.git]
/
teshsuite
/
s4u
/
storage_client_server
/
storage_client_server.cpp
diff --git
a/teshsuite/s4u/storage_client_server/storage_client_server.cpp
b/teshsuite/s4u/storage_client_server/storage_client_server.cpp
index
db4614c
..
7d71f93
100644
(file)
--- a/
teshsuite/s4u/storage_client_server/storage_client_server.cpp
+++ b/
teshsuite/s4u/storage_client_server/storage_client_server.cpp
@@
-10,15
+10,13
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(storage, "Messages specific for this simulation");
static void display_storage_properties(simgrid::s4u::Storage* storage)
{
static void display_storage_properties(simgrid::s4u::Storage* storage)
{
-
xbt_dict_t
props = storage->getProperties();
- if (
xbt_dict_length(props) > 0
) {
+
std::unordered_map<std::string, std::string>*
props = storage->getProperties();
+ if (
not props->empty()
) {
XBT_INFO("\tProperties of mounted storage: %s", storage->getName());
XBT_INFO("\tProperties of mounted storage: %s", storage->getName());
- xbt_dict_cursor_t cursor = NULL;
- char* key;
- char* data;
- xbt_dict_foreach (props, cursor, key, data)
- XBT_INFO("\t\t'%s' -> '%s'", key, data);
+ for (auto elm : *props) {
+ XBT_INFO(" %s->%s", elm.first.c_str(), elm.second.c_str());
+ }
} else {
XBT_INFO("\tNo property attached.");
}
} else {
XBT_INFO("\tNo property attached.");
}