refactor: add explicit this-> where possible

I have knowingly skipped some files/portions of files where this would
create merge conflicts for other open PRs.
This commit is contained in:
Rasmus Karlsson
2025-12-30 13:30:57 +01:00
committed by pajlada
parent e0101f71c2
commit 57d6583a2b
64 changed files with 180 additions and 177 deletions
+2 -2
View File
@@ -58,13 +58,13 @@ ChannelPointReward::ChannelPointReward(const QJsonObject &redemption)
}
// use bits cost when channel points were not used
if (cost == 0)
if (this->cost == 0)
{
this->cost = reward.value("bits_cost").toInt();
}
// workaround twitch bug where bits_cost is always 0 in practice
if (cost == 0)
if (this->cost == 0)
{
this->cost = reward.value("default_bits_cost").toInt();
}
+3 -3
View File
@@ -8,17 +8,17 @@ struct EmoteValue {
public:
int getSet()
{
return set_;
return this->set_;
}
int getId()
{
return id_;
return this->id_;
}
const QString &getChannelName()
{
return channelName_;
return this->channelName_;
}
private:
+1 -1
View File
@@ -1196,7 +1196,7 @@ void TwitchChannel::updateSeventvUser(
return;
}
updateSeventvData(this->seventvUserID_, dispatch.emoteSetID);
this->updateSeventvData(this->seventvUserID_, dispatch.emoteSetID);
SeventvEmotes::getEmoteSet(
dispatch.emoteSetID,
[this, weak = weakOf<Channel>(this), dispatch](auto &&emotes,
+1 -1
View File
@@ -393,7 +393,7 @@ struct HelixBadgeSet {
const auto jsonVersions = json.value("versions").toArray();
for (const auto &version : jsonVersions)
{
versions.emplace_back(version.toObject());
this->versions.emplace_back(version.toObject());
}
}
};
@@ -161,9 +161,9 @@ void EventSubMessageBuilder::appendUser(const lib::String &userName,
QString &text, bool trailingSpace)
{
auto login = userLogin.qt();
auto *el = this->emplace<MentionElement>(userName.qt(), login,
MessageColor::System,
channel->getUserColor(login));
auto *el = this->emplace<MentionElement>(
userName.qt(), login, MessageColor::System,
this->channel->getUserColor(login));
text.append(login);
if (trailingSpace)
@@ -19,7 +19,7 @@ RawSubscriptionHandle::~RawSubscriptionHandle()
// We're shutting down, assume the unsubscription has been taken care of
return;
}
app->getEventSub()->removeRef(request);
app->getEventSub()->removeRef(this->request);
}
} // namespace chatterino::eventsub