Use references instead of raw pointer, to store the “parent” object
In Bridge and IrcClient
This commit is contained in:
1 parent
8ddbe8d3e6
commit
7e2427148e
5 files changed
+75
-77
No files matched your search
@@ -488,7 +488,7 @@ Bridge* BiboumiComponent::get_user_bridge(const std::string& user_jid)
|
||||
}
|
||||
catch (const std::out_of_range& exception)
|
||||
{
|
||||
this->bridges.emplace(user_jid, std::make_unique<Bridge>(user_jid, this, this->poller));
|
||||
this->bridges.emplace(user_jid, std::make_unique<Bridge>(user_jid, *this, this->poller));
|
||||
return this->bridges.at(user_jid).get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user