diff options
Diffstat (limited to 'searchlib/src/tests/queryeval/blueprint/mysearch.h')
-rw-r--r-- | searchlib/src/tests/queryeval/blueprint/mysearch.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/searchlib/src/tests/queryeval/blueprint/mysearch.h b/searchlib/src/tests/queryeval/blueprint/mysearch.h index 520a5d8448f..82ef58147c3 100644 --- a/searchlib/src/tests/queryeval/blueprint/mysearch.h +++ b/searchlib/src/tests/queryeval/blueprint/mysearch.h @@ -94,7 +94,7 @@ public: } } - virtual void visitMembers(vespalib::ObjectVisitor &visitor) const override { + void visitMembers(vespalib::ObjectVisitor &visitor) const override { visit(visitor, "_tag", _tag); visit(visitor, "_isLeaf", _isLeaf); visit(visitor, "_isStrict", _isStrict); @@ -102,7 +102,7 @@ public: visit(visitor, "_handles", _handles); } - virtual ~MySearch() {} + ~MySearch() override {} }; //----------------------------------------------------------------------------- @@ -112,7 +112,7 @@ class MyLeaf : public SimpleLeafBlueprint typedef search::fef::TermFieldMatchDataArray TFMDA; public: - virtual SearchIterator::UP + SearchIterator::UP createLeafSearch(const TFMDA &tfmda, bool strict) const override { return SearchIterator::UP(new MySearch("leaf", tfmda, strict)); @@ -156,7 +156,11 @@ public: return *this; } MyLeaf *create() const { - MyLeaf *leaf = new MyLeaf(_fields); + return create<MyLeaf>(); + } + template<typename Leaf> + Leaf *create() const { + Leaf *leaf = new Leaf(_fields); leaf->estimate(_estimate.estHits, _estimate.empty); if (_cost_tier > 0) { leaf->cost_tier(_cost_tier); |