Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use (const) references with range-based for loops.
[simgrid.git] / src / smpi / include / smpi_keyvals.hpp
index 986540f..c0ee395 100644 (file)
@@ -140,7 +140,7 @@ template <typename T> int Keyval::attr_put(int keyval, void* attr_value){
 template <typename T> void Keyval::cleanup_attr(){
   if (not attributes()->empty()) {
     int flag=0;
-    for(auto it : attributes_){
+    for (auto const& it : attributes_) {
       auto elm = T::keyvals_.find(it.first);
       if (elm != T::keyvals_.end()) {
         smpi_key_elem elem = elm->second;