summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-11-07 14:43:52 +0100
committerlouiz’ <louiz@louiz.org>2016-11-07 14:43:52 +0100
commit962bac476cc69362b748675db58ea6eb364501e8 (patch)
tree9d9a17e7b0e85f64c4baa5e167ffe7fadb179c94 /src
parent7376831bc8f6dbec8eaf4f4c0a6bba819a0a1e59 (diff)
downloadbiboumi-962bac476cc69362b748675db58ea6eb364501e8.tar.gz
biboumi-962bac476cc69362b748675db58ea6eb364501e8.tar.bz2
biboumi-962bac476cc69362b748675db58ea6eb364501e8.tar.xz
biboumi-962bac476cc69362b748675db58ea6eb364501e8.zip
Trivial refactor of get_user_bridge function
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/biboumi_component.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index 4398562..010b415 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -663,8 +663,7 @@ Bridge* BiboumiComponent::get_user_bridge(const std::string& user_jid)
}
catch (const std::out_of_range& exception)
{
- this->bridges.emplace(bare_jid, std::make_unique<Bridge>(bare_jid, *this, this->poller));
- return this->bridges.at(bare_jid).get();
+ return this->bridges.emplace(bare_jid, std::make_unique<Bridge>(bare_jid, *this, this->poller)).first->second.get();
}
}