Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #215 from Takishipp/s_type_cleanup
[simgrid.git] / src / instr / jedule / jedule_events.cpp
index afe12f3..01ca092 100644 (file)
@@ -21,7 +21,7 @@ Event::Event(std::string name, double start_time, double end_time, std::string t
 Event::~Event()
 {
   if (not this->resource_subsets->empty()) {
-    for (auto subset: *this->resource_subsets)
+    for (auto const& subset : *this->resource_subsets)
       delete subset;
     delete this->resource_subsets;
   }
@@ -53,7 +53,7 @@ void Event::print(FILE *jed_file)
 
   xbt_assert(not this->resource_subsets->empty());
   fprintf(jed_file, "      <res_util>\n");
-  for (auto subset: *this->resource_subsets) {
+  for (auto const& subset : *this->resource_subsets) {
     fprintf(jed_file, "        <select resources=\"");
     fprintf(jed_file, "%s", subset->parent->getHierarchyAsString().c_str());
     fprintf(jed_file, ".[%d-%d]", subset->start_idx, subset->start_idx + subset->nres-1);
@@ -63,14 +63,14 @@ void Event::print(FILE *jed_file)
 
   if (not this->characteristics_list.empty()) {
     fprintf(jed_file, "      <characteristics>\n");
-    for (auto ch: this->characteristics_list)
+    for (auto const& ch : this->characteristics_list)
       fprintf(jed_file, "          <characteristic name=\"%s\" />\n", ch);
     fprintf(jed_file, "      </characteristics>\n");
   }
 
   if (not this->info_map.empty()) {
     fprintf(jed_file, "      <info>\n");
-    for (auto elm: this->info_map)
+    for (auto const& elm : this->info_map)
       fprintf(jed_file, "        <prop key=\"%s\" value=\"%s\" />\n",elm.first,elm.second);
     fprintf(jed_file, "      </info>\n");
   }