Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use (const) references with range-based for loops.
[simgrid.git] / src / bindings / java / jmsg_host.cpp
index 28804e7..a255e2e 100644 (file)
@@ -249,7 +249,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getMountedStorage(JNIEn
     return nullptr;
   }
 
-  for (auto elm : mounted_storages) {
+  for (auto const& elm : mounted_storages) {
     jname    = env->NewStringUTF(elm.second->getName());
     jstorage = Java_org_simgrid_msg_Storage_getByName(env,cls,jname);
     env->SetObjectArrayElement(jtable, index, jstorage);