Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't shadow parameter "parent".
[simgrid.git] / src / instr / jedule / jedule_platform.cpp
index 2b80a60..47919e0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -64,13 +64,13 @@ void Container::add_resources(std::vector<sg_host_t> hosts)
 void Container::create_hierarchy(sg_netzone_t from_as)
 {
 
-  if (from_as->get_children()->empty()) {
+  if (from_as->get_children().empty()) {
     // I am no AS
     // add hosts to jedule platform
     std::vector<sg_host_t> table = from_as->get_all_hosts();
     this->add_resources(table);
   } else {
-    for (auto const& nz : *from_as->get_children()) {
+    for (auto const& nz : from_as->get_children()) {
       jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->get_cname()));
       this->add_child(child_container);
       child_container->create_hierarchy(nz);
@@ -176,8 +176,8 @@ static void add_subsets_to(std::vector<jed_subset_t> *subset_list, std::vector<c
 
   for (auto const& host_name : hostgroup) {
     xbt_assert( host_name != nullptr );
-    jed_container_t parent = host2_simgrid_parent_container.at(host_name);
-    unsigned int id = parent->name2id.at(host_name);
+    jed_container_t parent_cont = host2_simgrid_parent_container.at(host_name);
+    unsigned int id             = parent_cont->name2id.at(host_name);
     id_list.push_back(id);
   }
   unsigned int nb_ids = id_list.size();