fix: capture channelId by value instead of ref

This commit is contained in:
iProdigy 2024-10-21 13:27:30 -07:00
parent e326ce428c
commit d2681a0b43

View file

@ -1149,7 +1149,7 @@ std::optional<QString> TwitchIrcServer::getOrPopulateChannelCache(
const auto cache = this->channelNamesById_.access(); const auto cache = this->channelNamesById_.access();
cache->put(user.id, user.displayName); cache->put(user.id, user.displayName);
}, },
[this, &channelId] { [this, channelId] {
const auto cache = this->channelNamesById_.access(); const auto cache = this->channelNamesById_.access();
if (cache->exists(channelId) && cache->get(channelId).isEmpty()) if (cache->exists(channelId) && cache->get(channelId).isEmpty())
{ {