// FIXME: The following duplicates the content of s4u::Host
extern std::map<std::string, simgrid::s4u::Host*> host_list;
/** @brief Returns the amount of hosts in the platform */
// FIXME: The following duplicates the content of s4u::Host
extern std::map<std::string, simgrid::s4u::Host*> host_list;
/** @brief Returns the amount of hosts in the platform */
- if (pimpl->netpoints_.find(name) == pimpl->netpoints_.end())
- return nullptr;
- return pimpl->netpoints_.at(name);
+ auto netp = pimpl->netpoints_.find(name);
+ return netp == pimpl->netpoints_.end() ? nullptr : netp->second;