summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network.cpp b/src/network.cpp
index 9081b18..74783b4 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -45,9 +45,11 @@ const Identity & Server::identity() const
Service & Server::svcHelper(const std::type_info & tinfo)
{
- for (auto & s : p->services)
- if (typeid(*s) == tinfo)
- return *s;
+ for (auto & s : p->services) {
+ auto & sobj = *s;
+ if (typeid(sobj) == tinfo)
+ return sobj;
+ }
throw runtime_error("service not found");
}