-/* 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. */
nres=end_idx-start_idx+1;
}
-
-Container::Container(std::string name): name(name)
+Container::Container(std::string name) : name(std::move(name))
{
container_name2container.insert({this->name, this});
}
this->children.clear();
this->last_id_ = 0;
- //FIXME do we need to sort?: xbt_dynar_sort_strings(host_names);
-
for (auto const& host : hosts) {
const char *host_name = sg_host_get_name(host);
this->name2id.insert({host_name, this->last_id_});
this->add_resources(table);
} else {
for (auto const& nz : from_as->get_children()) {
- jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->get_cname()));
+ jed_container_t child_container = new simgrid::jedule::Container(nz->get_name());
this->add_child(child_container);
child_container->create_hierarchy(nz);
}
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();