diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-18 16:56:54 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-18 16:56:54 +0100 |
commit | 9e73d0dac0774955348a5164087363c5b33927b8 (patch) | |
tree | 61eb5d729c4e48e1fabe596f387a3e67a1d1d415 /lib/urlfilter | |
parent | Rewrite lib/web to lib/webprofile (diff) | |
download | smolbote-9e73d0dac0774955348a5164087363c5b33927b8.tar.xz |
Add tools/report-clang-tidy.sh
- Fix various clang-tidy warnings
- Fix use-after-free crash when deleting profiles
Diffstat (limited to 'lib/urlfilter')
-rw-r--r-- | lib/urlfilter/hostlist/hostlist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/urlfilter/hostlist/hostlist.cpp b/lib/urlfilter/hostlist/hostlist.cpp index ec0b214..ff652cf 100644 --- a/lib/urlfilter/hostlist/hostlist.cpp +++ b/lib/urlfilter/hostlist/hostlist.cpp @@ -62,11 +62,11 @@ void HostList::parseLine(const QString& line) return; const QStringList parts = parsedLine.split(QLatin1Literal(" ")); - const QString redirect = parts.at(0); + const QString &redirect = parts.at(0); const auto action = (redirect == QLatin1Literal("0.0.0.0")) ? UrlFilter::Block : UrlFilter::Redirect; for(int i = 1; i < parts.size(); i++) { - const QString domain = parts.at(i); + const QString &domain = parts.at(i); Rule r; r.action = action; r.domainHash = qHash(domain); |