Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
avoid potential division by 0... But not sure 0 is right as an answer here
[simgrid.git] / src / s4u / s4u_file.cpp
index 35f59e7..14c73e0 100644 (file)
@@ -27,7 +27,7 @@ File::File(std::string fullpath, sg_host_t host, void* userdata) : path_(fullpat
   std::string path;
   XBT_DEBUG("Search for storage name for '%s' on '%s'", fullpath.c_str(), host->getCname());
 
-  for (auto mnt : host->getMountedStorages()) {
+  for (auto const& mnt : host->getMountedStorages()) {
     XBT_DEBUG("See '%s'", mnt.first.c_str());
     mount_point = fullpath.substr(0, mnt.first.length());