summaryrefslogtreecommitdiff
path: root/src/adblock/adblockrulefallbackimpl.cpp
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-08-18 23:41:05 +0200
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-08-19 03:18:29 +0200
commite5815346cd4870640051856abed0887717aa0bf7 (patch)
tree7ff7d8a66d1febfcc793dbe67c9d3d182ab05977 /src/adblock/adblockrulefallbackimpl.cpp
parentMerge commit 'refs/merge-requests/178' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-e5815346cd4870640051856abed0887717aa0bf7.tar.xz
Improve the performance of AdBlockRuleTextMatchImpl
Comparing unicode string without case sensitive is rather expensive because each codepoint must be converted, which is non trivial for unicode. This patch introduce a new argument of ::match() taking the encoded url in lowercase. This way, the conversion can be done only once for a lot of rules.
Diffstat (limited to 'src/adblock/adblockrulefallbackimpl.cpp')
-rw-r--r--src/adblock/adblockrulefallbackimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/adblock/adblockrulefallbackimpl.cpp b/src/adblock/adblockrulefallbackimpl.cpp
index decb895d..988f2895 100644
--- a/src/adblock/adblockrulefallbackimpl.cpp
+++ b/src/adblock/adblockrulefallbackimpl.cpp
@@ -61,7 +61,7 @@ AdBlockRuleFallbackImpl::AdBlockRuleFallbackImpl(const QString &filter)
m_regExp.setPattern(parsedLine);
}
-bool AdBlockRuleFallbackImpl::match(const QString &encodedUrl) const
+bool AdBlockRuleFallbackImpl::match(const QString &encodedUrl, const QString &) const
{
return m_regExp.indexIn(encodedUrl) != -1;
}