NetZoneImpl* get_parent() const { return parent_; }
/** @brief Returns the list of direct children (no grand-children). This returns the internal data, no copy.
* Don't mess with it.*/
- std::vector<NetZoneImpl*>* get_children() { return &children_; }
+ const std::vector<NetZoneImpl*>& get_children() { return children_; }
/** @brief Get current netzone hierarchy */
RoutingMode get_hierarchy() const { return hierarchy_; }
for (auto* host : get_all_hosts()) {
host->seal();
}
- for (auto* sub_net : *get_children()) {
+ for (auto* sub_net : get_children()) {
sub_net->seal();
}
sealed_ = true;
std::vector<NetZone*> NetZone::get_children() const
{
std::vector<NetZone*> res;
- for (auto child : *(pimpl_->get_children()))
+ for (auto child : pimpl_->get_children())
res.push_back(child->get_iface());
return res;
}