{
XBT_DEBUG("destroy container %s", get_cname());
// Begin with destroying my own children
- for (auto [_, child] : children_)
+ for (auto const& [_, child] : children_)
delete child;
// remove me from the all_containers_ data structure
/* Since hosts_ and links_ are a std::map, the hosts are destroyed in the lexicographic order, which ensures that the
* output is reproducible.
*/
- for (auto& [_, host] : hosts_) {
+ for (auto const& [_, host] : hosts_) {
host->destroy();
}
hosts_.clear();
- for (auto& [_, link] : links_) {
+ for (auto const& [_, link] : links_) {
link->destroy();
}
links_.clear();