diff options
Diffstat (limited to 'searchlib/src/tests/queryeval/blueprint/mysearch.h')
-rw-r--r-- | searchlib/src/tests/queryeval/blueprint/mysearch.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/searchlib/src/tests/queryeval/blueprint/mysearch.h b/searchlib/src/tests/queryeval/blueprint/mysearch.h index 82ef58147c3..dbd73b6f40e 100644 --- a/searchlib/src/tests/queryeval/blueprint/mysearch.h +++ b/searchlib/src/tests/queryeval/blueprint/mysearch.h @@ -1,9 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchlib/queryeval/blueprint.h> #include <vespa/searchlib/queryeval/multisearch.h> -#include <vespa/searchlib/fef/termfieldmatchdataarray.h> -#include <vespa/searchlib/fef/matchdata.h> #include <vespa/vespalib/objects/visit.hpp> +#include <cassert> namespace search::queryeval { @@ -94,7 +93,7 @@ public: } } - void visitMembers(vespalib::ObjectVisitor &visitor) const override { + virtual void visitMembers(vespalib::ObjectVisitor &visitor) const override { visit(visitor, "_tag", _tag); visit(visitor, "_isLeaf", _isLeaf); visit(visitor, "_isStrict", _isStrict); @@ -102,7 +101,7 @@ public: visit(visitor, "_handles", _handles); } - ~MySearch() override {} + virtual ~MySearch() {} }; //----------------------------------------------------------------------------- @@ -112,7 +111,7 @@ class MyLeaf : public SimpleLeafBlueprint typedef search::fef::TermFieldMatchDataArray TFMDA; public: - SearchIterator::UP + virtual SearchIterator::UP createLeafSearch(const TFMDA &tfmda, bool strict) const override { return SearchIterator::UP(new MySearch("leaf", tfmda, strict)); @@ -156,11 +155,7 @@ public: return *this; } MyLeaf *create() const { - return create<MyLeaf>(); - } - template<typename Leaf> - Leaf *create() const { - Leaf *leaf = new Leaf(_fields); + MyLeaf *leaf = new MyLeaf(_fields); leaf->estimate(_estimate.estHits, _estimate.empty); if (_cost_tier > 0) { leaf->cost_tier(_cost_tier); |