Commit 962bac47 authored by louiz’'s avatar louiz’

Trivial refactor of get_user_bridge function

parent 7376831b
......@@ -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();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment