if (not props->empty()) {
XBT_INFO("\tProperties of mounted storage: %s", storage->getName());
- for (auto elm : *props) {
+ for (auto const& elm : *props) {
XBT_INFO(" %s->%s", elm.first.c_str(), elm.second.c_str());
}
} else {
XBT_INFO("Print the content of the storage element: %s", storage->getName());
std::map<std::string, sg_size_t>* content = storage->getContent();
if (not content->empty()) {
- for (auto entry : *content)
+ for (auto const& entry : *content)
XBT_INFO("\t%s size: %llu bytes", entry.first.c_str(), entry.second);
} else {
XBT_INFO("\tNo content.");
{
std::map<std::string, simgrid::s4u::Storage*>* storages = simgrid::s4u::allStorages();
- for (auto storage : *storages) {
+ for (auto const& storage : *storages) {
XBT_INFO("Storage %s is attached to %s", storage.first.c_str(), storage.second->getHost()->getCname());
storage.second->setProperty("other usage", "gpfs");
}
{
XBT_INFO("*** Storage info on %s ***", host->getCname());
- for (auto elm : host->getMountedStorages()) {
+ for (auto const& elm : host->getMountedStorages()) {
const char* mount_name = elm.first.c_str();
simgrid::s4u::Storage* storage = elm.second;
XBT_INFO("\tStorage name: %s, mount name: %s", storage->getName(), mount_name);