Revert "Replace a useless shared_ptr by a unique_ptr"

This reverts commit 248e25c22f.

In preparation for the botan 3 update `IrcClient` must be made into a
`shared_ptr`, which will then allow us to pass a `shared_ptr` of
callbacks to `Botan::TLS::Client`
This commit is contained in:
Luca Matei Pintilie
2025-07-29 15:52:16 +02:00
parent 40adab8b56
commit 8c4769e27b
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -226,8 +226,8 @@ public:
* iq_responder_callback_t and remove the callback from the list.
*/
void trigger_on_irc_message(const std::string& irc_hostname, const IrcMessage& message);
std::unordered_map<std::string, std::unique_ptr<IrcClient>>& get_irc_clients();
const std::unordered_map<std::string, std::unique_ptr<IrcClient>>& get_irc_clients() const;
std::unordered_map<std::string, std::shared_ptr<IrcClient>>& get_irc_clients();
const std::unordered_map<std::string, std::shared_ptr<IrcClient>>& get_irc_clients() const;
std::set<char> get_chantypes(const std::string& hostname) const;
#ifdef USE_DATABASE
void set_record_history(const bool val);
@@ -260,7 +260,7 @@ private:
* One IrcClient for each IRC server we need to be connected to.
* The pointer is shared by the bridge and the poller.
*/
std::unordered_map<std::string, std::unique_ptr<IrcClient>> irc_clients;
std::unordered_map<std::string, std::shared_ptr<IrcClient>> irc_clients;
/**
* To communicate back with the XMPP component
*/