Use references instead of raw pointer, to store the “parent” object

In Bridge and IrcClient
This commit is contained in:
Florent Le Coz
2015-12-21 14:51:26 +01:00
parent 8ddbe8d3e6
commit 7e2427148e
5 changed files with 75 additions and 77 deletions
+1 -1
View File
@@ -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();
}
}