Fix signal connection nodiscard warnings (#4818)
This commit is contained in:
@@ -133,21 +133,24 @@ void TwitchIrcServer::initializeConnection(IrcConnection *connection,
|
||||
std::shared_ptr<Channel> TwitchIrcServer::createChannel(
|
||||
const QString &channelName)
|
||||
{
|
||||
auto channel =
|
||||
std::shared_ptr<TwitchChannel>(new TwitchChannel(channelName));
|
||||
auto channel = std::make_shared<TwitchChannel>(channelName);
|
||||
channel->initialize();
|
||||
|
||||
channel->sendMessageSignal.connect(
|
||||
// We can safely ignore these signal connections since the TwitchIrcServer is only
|
||||
// ever destroyed when the full Application state is about to be destroyed, at which point
|
||||
// no Channel's should live
|
||||
// NOTE: CHANNEL_LIFETIME
|
||||
std::ignore = channel->sendMessageSignal.connect(
|
||||
[this, channel = channel.get()](auto &chan, auto &msg, bool &sent) {
|
||||
this->onMessageSendRequested(channel, msg, sent);
|
||||
});
|
||||
channel->sendReplySignal.connect(
|
||||
std::ignore = channel->sendReplySignal.connect(
|
||||
[this, channel = channel.get()](auto &chan, auto &msg, auto &replyId,
|
||||
bool &sent) {
|
||||
this->onReplySendRequested(channel, msg, replyId, sent);
|
||||
});
|
||||
|
||||
return std::shared_ptr<Channel>(channel);
|
||||
return channel;
|
||||
}
|
||||
|
||||
void TwitchIrcServer::privateMessageReceived(
|
||||
|
||||
Reference in New Issue
Block a user