Commit 80ea6224 authored by Laurent Montel's avatar Laurent Montel 😁

Port to nullptr

parent 854fa8b5
......@@ -108,13 +108,13 @@ const AdBlockRule *AdBlockSearchTree::find(const QWebEngineUrlRequestInfo &reque
const AdBlockRule *AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInfo &request, const QString &domain, const QString &urlString, const QChar *string, int len) const
{
if (len <= 0) {
return 0;
return nullptr;
}
QChar c = string[0];
if (!m_root->children.contains(c)) {
return 0;
return nullptr;
}
Node *node = m_root->children[c];
......@@ -127,7 +127,7 @@ const AdBlockRule *AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInf
}
if (!node->children.contains(c)) {
return 0;
return nullptr;
}
node = node->children[c];
......@@ -137,7 +137,7 @@ const AdBlockRule *AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInf
return node->rule;
}
return 0;
return nullptr;
}
void AdBlockSearchTree::deleteNode(AdBlockSearchTree::Node *node)
......
......@@ -251,7 +251,7 @@ QVector<AdBlockRule *> AdBlockSubscription::allRules() const
const AdBlockRule *AdBlockSubscription::enableRule(int offset)
{
if (!AdblockUtil::containsIndex(m_rules, offset)) {
return 0;
return nullptr;
}
AdBlockRule *rule = m_rules[offset];
......@@ -270,7 +270,7 @@ const AdBlockRule *AdBlockSubscription::enableRule(int offset)
const AdBlockRule *AdBlockSubscription::disableRule(int offset)
{
if (!AdblockUtil::containsIndex(m_rules, offset)) {
return 0;
return nullptr;
}
AdBlockRule *rule = m_rules[offset];
......@@ -312,7 +312,7 @@ const AdBlockRule *AdBlockSubscription::replaceRule(AdBlockRule *rule, int offse
{
Q_UNUSED(rule)
Q_UNUSED(offset)
return 0;
return nullptr;
}
AdBlockSubscription::~AdBlockSubscription()
......@@ -459,7 +459,7 @@ bool AdBlockCustomList::removeRule(int offset)
const AdBlockRule *AdBlockCustomList::replaceRule(AdBlockRule *rule, int offset)
{
if (!AdblockUtil::containsIndex(m_rules, offset)) {
return 0;
return nullptr;
}
AdBlockRule *oldRule = m_rules.at(offset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment