Commit 54637866 authored by Laurent Montel's avatar Laurent Montel 😁

Minor

parent ae6db47a
......@@ -42,7 +42,6 @@ using namespace AdBlock;
AdBlockMatcher::AdBlockMatcher(AdblockManager *manager)
: QObject(manager)
, m_manager(manager)
, m_enabled(false)
{
connect(manager, &AdblockManager::enabledChanged, this, &AdBlockMatcher::enabledChanged);
}
......
......@@ -82,7 +82,7 @@ private:
QString m_elementHidingRules;
AdBlockSearchTree m_networkBlockTree;
AdBlockSearchTree m_networkExceptionTree;
bool m_enabled;
bool m_enabled = false;
};
}
......
......@@ -588,7 +588,7 @@ bool AdBlockRule::filterIsOnlyDomain(const QString &filter) const
bool AdBlockRule::filterIsOnlyEndsMatch(const QString &filter) const
{
for (int i = 0; i < filter.size(); ++i) {
for (int i = 0, total = filter.size(); i < total; ++i) {
switch (filter.at(i).toLatin1()) {
case '^':
case '*':
......
......@@ -44,6 +44,7 @@ AdBlockSearchTree::AdBlockSearchTree()
AdBlockSearchTree::~AdBlockSearchTree()
{
deleteNode(m_root);
m_root = nullptr;
}
void AdBlockSearchTree::clear()
......
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