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:
@@ -17,8 +17,8 @@ AuthorPredicate::AuthorPredicate(const QString &authors, bool negate)
|
||||
|
||||
bool AuthorPredicate::appliesToImpl(const Message &message)
|
||||
{
|
||||
return authors_.contains(message.displayName, Qt::CaseInsensitive) ||
|
||||
authors_.contains(message.loginName, Qt::CaseInsensitive);
|
||||
return this->authors_.contains(message.displayName, Qt::CaseInsensitive) ||
|
||||
this->authors_.contains(message.loginName, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -35,7 +35,7 @@ bool BadgePredicate::appliesToImpl(const Message &message)
|
||||
{
|
||||
for (const Badge &badge : message.badges)
|
||||
{
|
||||
if (badges_.contains(badge.key_, Qt::CaseInsensitive))
|
||||
if (this->badges_.contains(badge.key_, Qt::CaseInsensitive))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ ChannelPredicate::ChannelPredicate(const QString &channels, bool negate)
|
||||
|
||||
bool ChannelPredicate::appliesToImpl(const Message &message)
|
||||
{
|
||||
return channels_.contains(message.channelName, Qt::CaseInsensitive);
|
||||
return this->channels_.contains(message.channelName, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -71,10 +71,10 @@ bool MessageFlagsPredicate::appliesToImpl(const Message &message)
|
||||
if (this->flags_.has(MessageFlag::System) &&
|
||||
!this->flags_.has(MessageFlag::Timeout))
|
||||
{
|
||||
return message.flags.hasAny(flags_) &&
|
||||
return message.flags.hasAny(this->flags_) &&
|
||||
!message.flags.has(MessageFlag::Timeout);
|
||||
}
|
||||
return message.flags.hasAny(flags_);
|
||||
return message.flags.hasAny(this->flags_);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -12,12 +12,12 @@ RegexPredicate::RegexPredicate(const QString ®ex, bool negate)
|
||||
|
||||
bool RegexPredicate::appliesToImpl(const Message &message)
|
||||
{
|
||||
if (!regex_.isValid())
|
||||
if (!this->regex_.isValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QRegularExpressionMatch match = regex_.match(message.messageText);
|
||||
QRegularExpressionMatch match = this->regex_.match(message.messageText);
|
||||
|
||||
return match.hasMatch();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ bool SubtierPredicate::appliesToImpl(const Message &message)
|
||||
const auto &subTier =
|
||||
badge.value_.length() > 3 ? badge.value_.at(0) : '1';
|
||||
|
||||
return subtiers_.contains(subTier);
|
||||
return this->subtiers_.contains(subTier);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user