Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use (const) references with range-based for loops.
[simgrid.git] / src / bindings / java / jmsg.cpp
index 4f76619..09d4170 100644 (file)
@@ -5,7 +5,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <locale.h>
+#include <clocale>
 
 #include "simgrid/msg.h"
 #include "simgrid/plugins/energy.h"
@@ -154,7 +154,7 @@ JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass
   xbt_dynar_free(&hosts);
 
   /* Cleanup java storages */
-  for (auto elm : java_storage_map)
+  for (auto const& elm : java_storage_map)
     jstorage_unref(env, elm.second);
 }