diff options
Diffstat (limited to 'lib/urlfilter/filtertree.h')
-rw-r--r-- | lib/urlfilter/filtertree.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/urlfilter/filtertree.h b/lib/urlfilter/filtertree.h index 8cecf50..004cf5a 100644 --- a/lib/urlfilter/filtertree.h +++ b/lib/urlfilter/filtertree.h @@ -14,6 +14,7 @@ #include <vector> #include <QIODevice> #include "filterleaf.h" +#include "domain.h" /** FilterTree: B+ tree of filter rules * The root of the tree contains branches that represent domains, on which their rules are to be applied. @@ -31,10 +32,16 @@ public: private: struct Branch { + explicit Branch(const QString &host) : domain(host) {} + explicit Branch(Branch &&other) + : domain(std::move(other.domain)) + , leaves(std::move(other.leaves)) + {} ~Branch() { qDeleteAll(leaves); } // TODO: replace domain type with domain-matching class - std::string domain; + Domain domain; + //std::string domain; std::vector<FilterLeaf *> leaves; }; |