A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sonar issues.
[simgrid.git]
/
src
/
kernel
/
routing
/
NetZoneImpl.cpp
diff --git
a/src/kernel/routing/NetZoneImpl.cpp
b/src/kernel/routing/NetZoneImpl.cpp
index
fe2c721
..
18d00d9
100644
(file)
--- a/
src/kernel/routing/NetZoneImpl.cpp
+++ b/
src/kernel/routing/NetZoneImpl.cpp
@@
-343,13
+343,11
@@
resource::SplitDuplexLinkImpl* NetZoneImpl::get_split_duplex_link_by_name_or_nul
resource::HostImpl* NetZoneImpl::get_host_by_name_or_null(const std::string& name) const
{
resource::HostImpl* NetZoneImpl::get_host_by_name_or_null(const std::string& name) const
{
- auto host_it = hosts_.find(name);
- if (host_it != hosts_.end())
+ if (auto host_it = hosts_.find(name); host_it != hosts_.end())
return host_it->second;
for (const auto* child : children_) {
return host_it->second;
for (const auto* child : children_) {
- auto* host = child->get_host_by_name_or_null(name);
- if (host)
+ if (auto* host = child->get_host_by_name_or_null(name))
return host;
}
return host;
}