summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-06-04 15:55:50 +0200
committerHenning Baldersheim <balder@oath.com>2018-06-04 15:55:50 +0200
commit744cbe633ad293b4894d524b2f1505af5dfc2d41 (patch)
tree846a51ba4d78a21d16ba735b3c38093061ecb7d9 /searchlib
parent3397e58aae2dad0abbec4e1d2d8c87c220e52a8e (diff)
Introduce a common parent of the various term nodes.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/query/tree/term.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/query/tree/term.h b/searchlib/src/vespa/searchlib/query/tree/term.h
index b544109317b..f931a54eda9 100644
--- a/searchlib/src/vespa/searchlib/query/tree/term.h
+++ b/searchlib/src/vespa/searchlib/query/tree/term.h
@@ -41,11 +41,15 @@ protected:
Term(const vespalib::stringref &view, int32_t id, Weight weight);
};
+class TermNode : public Node, public Term {
+protected:
+ TermNode(vespalib::stringref view, int32_t id, Weight weight) : Term(view, id, weight) {}
+};
/**
* Generic functionality for most of Term's derived classes.
*/
template <typename T>
-class TermBase : public Node, public Term {
+class TermBase : public TermNode {
T _term;
public:
@@ -61,7 +65,7 @@ protected:
template <typename T>
TermBase<T>::TermBase(T term, vespalib::stringref view, int32_t id, Weight weight)
- : Term(view, id, weight),
+ : TermNode(view, id, weight),
_term(std::move(term))
{}