diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-06-16 11:56:32 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-06-16 11:56:32 +0000 |
commit | ee026cbcbebdd46419fda51fd90e0ad4d43ed21d (patch) | |
tree | 55d15454a6e9935a629fdb07e522379987c76baa /searchcore | |
parent | a0e98aafe4ca861727659b8adee762e0ab704ce0 (diff) |
override final, or final override
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp | 1 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/querynodes.h | 21 |
2 files changed, 13 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp b/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp index b7c5467d8cf..c9d90f1815b 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp @@ -24,7 +24,6 @@ using search::fef::FieldType; using search::fef::IIndexEnvironment; using search::fef::MatchData; using search::fef::MatchDataLayout; -using search::fef::SimpleTermData; using search::fef::TermFieldHandle; using search::query::Node; using search::query::TemplateTermVisitor; diff --git a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h index 13bf3e30c29..7ae07d20cac 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h +++ b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h @@ -76,8 +76,8 @@ uint32_t numTerms<search::query::Phrase>(const search::query::Phrase &n) { } // namespace proton::matching::<unnamed> template <typename Base> -struct ProtonTerm : public Base, - public ProtonTermData +struct ProtonTermNonFinal : public Base, + public ProtonTermData { using Base::Base; @@ -89,10 +89,15 @@ struct ProtonTerm : public Base, } // ITermData interface - virtual uint32_t getPhraseLength() const { return numTerms<Base>(*this); } - virtual uint32_t getTermIndex() const { return -1; } - virtual search::query::Weight getWeight() const { return Base::getWeight(); } - virtual uint32_t getUniqueId() const { return Base::getId(); } + uint32_t getPhraseLength() const override final { return numTerms<Base>(*this); } + uint32_t getTermIndex() const override final { return -1; } + search::query::Weight getWeight() const override final { return Base::getWeight(); } + uint32_t getUniqueId() const override final { return Base::getId(); } +}; + +template <typename Base> +struct ProtonTerm : public ProtonTermNonFinal<Base> { + using ProtonTermNonFinal<Base>::ProtonTermNonFinal; }; typedef search::query::SimpleAnd ProtonAnd; @@ -103,10 +108,10 @@ typedef search::query::SimpleOr ProtonOr; typedef search::query::SimpleRank ProtonRank; typedef search::query::SimpleWeakAnd ProtonWeakAnd; -struct ProtonEquiv : public ProtonTerm<search::query::Equiv> +struct ProtonEquiv final : public ProtonTermNonFinal<search::query::Equiv> { search::fef::MatchDataLayout children_mdl; - using ProtonTerm::ProtonTerm; + using ProtonTermNonFinal::ProtonTermNonFinal; }; typedef ProtonTerm<search::query::LocationTerm> ProtonLocationTerm; |