diff options
Diffstat (limited to 'connectionregistry.cpp')
-rw-r--r-- | connectionregistry.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/connectionregistry.cpp b/connectionregistry.cpp index 412472d..5b2ea2b 100644 --- a/connectionregistry.cpp +++ b/connectionregistry.cpp @@ -53,11 +53,17 @@ void ConnectionRegistry::delConnection(ConnectionRegistry::connection c) std::unordered_set<ConnectionRegistry::connection>::iterator ConnectionRegistry::begin(const std::string& id) { + if (!m_ids.contains(id)) + return std::unordered_set<ConnectionRegistry::connection>::iterator{}; + return m_ids.at(id).begin(); } std::unordered_set<ConnectionRegistry::connection>::iterator ConnectionRegistry::end(const std::string& id) { + if (!m_ids.contains(id)) + return std::unordered_set<ConnectionRegistry::connection>::iterator{}; + return m_ids.at(id).end(); } |